Lattice Hub 文档
HTTP OpenAPI配置

配置模板

配置文件模板管理。

配置文件模板管理。

默认 Base URL:http://127.0.0.1:8090。管理面接口需 Authorization(登录返回的 token)。

配置模板

配置文件模板管理。

GET/config/v1/templates需要鉴权

查询配置模板

查询配置模板。

  • Authorizationheader · string必填

    登录返回的 token。

请求示例
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success"
}
POST/config/v1/templates需要鉴权

创建配置模板

创建配置模板。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · ConfigFileTemplate[]必填

    请求体为 ConfigFileTemplate 的 JSON 数组;下列为单条字段。

  • idbody · uint64可选

    id

  • namebody · string可选

    name

  • contentbody · string可选

    content

  • formatbody · string可选

    format

  • commentbody · string可选

    comment

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • ConfigFileTemplatebody · ConfigFileTemplate可选

    实体字段。

    • idbody · uint64可选

      id

    • namebody · string可选

      name

    • contentbody · string可选

      content

    • formatbody · string可选

      format

    • commentbody · string可选

      comment

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}
PUT/config/v1/templates需要鉴权

更新配置模板

更新配置模板。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · ConfigFileTemplate[]必填

    请求体为 ConfigFileTemplate 的 JSON 数组;下列为单条字段。

  • idbody · uint64可选

    id

  • namebody · string可选

    name

  • contentbody · string可选

    content

  • formatbody · string可选

    format

  • commentbody · string可选

    comment

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • ConfigFileTemplatebody · ConfigFileTemplate可选

    实体字段。

    • idbody · uint64可选

      id

    • namebody · string可选

      name

    • contentbody · string可选

      content

    • formatbody · string可选

      format

    • commentbody · string可选

      comment

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/config/v1/templates' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}

On this page