Lattice Hub Docs
HTTP OpenAPIConfig

Config templates

Config file template management.

Config file template management.

Default Base URL: http://127.0.0.1:8090. Management APIs require Authorization (token from login).

Config templates

Config file template management.

GET/config/v1/templatesAuth required

List config templates

List config templates.

  • Authorizationheader · stringrequired

    Token from login.

Request
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN"
Response example
{
  "code": 200000,
  "info": "execute success"
}
POST/config/v1/templatesAuth required

Create config templates

Create config templates.

  • Authorizationheader · stringrequired

    Token from login.

  • (body)body · ConfigFileTemplate[]required

    JSON array of ConfigFileTemplate; fields below are per-item.

  • idbody · uint64optional

    id

  • namebody · stringoptional

    name

  • contentbody · stringoptional

    content

  • formatbody · stringoptional

    format

  • commentbody · stringoptional

    comment

  • codebody · uint32required

    Business code.

  • infobody · stringoptional

    Info.

  • ConfigFileTemplatebody · ConfigFileTemplateoptional

    Entity fields.

    • idbody · uint64optional

      id

    • namebody · stringoptional

      name

    • contentbody · stringoptional

      content

    • formatbody · stringoptional

      format

    • commentbody · stringoptional

      comment

    • ctimebody · stringoptional

      ctime

    • mtimebody · stringoptional

      mtime

Request
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
Response example
{
  "code": 200000,
  "info": "execute success"
}
PUT/config/v1/templatesAuth required

Update config templates

Update config templates.

  • Authorizationheader · stringrequired

    Token from login.

  • (body)body · ConfigFileTemplate[]required

    JSON array of ConfigFileTemplate; fields below are per-item.

  • idbody · uint64optional

    id

  • namebody · stringoptional

    name

  • contentbody · stringoptional

    content

  • formatbody · stringoptional

    format

  • commentbody · stringoptional

    comment

  • codebody · uint32required

    Business code.

  • infobody · stringoptional

    Info.

  • ConfigFileTemplatebody · ConfigFileTemplateoptional

    Entity fields.

    • idbody · uint64optional

      id

    • namebody · stringoptional

      name

    • contentbody · stringoptional

      content

    • formatbody · stringoptional

      format

    • commentbody · stringoptional

      comment

    • ctimebody · stringoptional

      ctime

    • mtimebody · stringoptional

      mtime

Request
curl -sS -X PUT 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
Response example
{
  "code": 200000,
  "info": "execute success"
}

On this page