Lattice Hub Docs
HTTP OpenAPI

Namespaces

Environment Namespace CRUD.

Environment Namespace CRUD.

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

Namespaces

Namespace means environment, not tenant. Write bodies are Namespace arrays.

GET/core/v1/namespacesAuth required

List namespaces

List namespaces.

  • Authorizationheader · stringrequired

    Token from login.

  • namequery · stringoptional

    Filter by name (Enrich marks required; empty usually means all).

  • offsetquery · integeroptional

    Offset, default 0.

  • limitquery · integeroptional

    Page size, max 100.

Request
curl -sS 'http://127.0.0.1:8090/core/v1/namespaces?limit=20' \
  -H "Authorization: $TOKEN"
Response example
{
  "code": 200000,
  "info": "execute success",
  "namespaces": [{ "name": "default" }, { "name": "pole-system" }]
}
POST/core/v1/namespacesAuth required

Create namespaces

Write bodies are usually protobuf message arrays; fields below are per-object (see specification).

  • Authorizationheader · stringrequired

    Token from login.

  • (body)body · Namespace[]required

    Request body is a JSON array of Namespace: [{...}, ...]. Fields below are the full per-item schema (including nested).

  • idbody · stringoptional

    id

  • namebody · stringrequired

    name

  • commentbody · stringoptional

    comment

  • ownersbody · stringoptional

    owners

  • tokenbody · stringoptional

    token

  • service_export_tobody · string[]optional

    service_export_to

  • metadatabody · map<string,string>optional

    metadata

  • codebody · uint32required

    Business code; success is usually 200000.

  • infobody · stringoptional

    Info message.

  • namespacebody · Namespaceoptional

    Namespace entity fields (batch APIs nest under responses[]).

    • idbody · stringoptional

      id

    • namebody · stringoptional

      name

    • commentbody · stringoptional

      comment

    • ownersbody · stringoptional

      owners

    • tokenbody · stringoptional

      token

    • ctimebody · stringoptional

      ctime

    • mtimebody · stringoptional

      mtime

    • service_export_tobody · string[]optional

      service_export_to

    • metadatabody · map<string,string>optional

      metadata

    • total_service_countbody · uint32optional

      total_service_count

    • total_health_instance_countbody · uint32optional

      total_health_instance_count

    • total_instance_countbody · uint32optional

      total_instance_count

    • total_config_file_countbody · uint32optional

      total_config_file_count

    • editablebody · booloptional

      editable

    • deleteablebody · booloptional

      deleteable

Request
curl -sS -X POST 'http://127.0.0.1:8090/core/v1/namespaces' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"staging","comment":"pre-prod"}]'
Response example
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/core/v1/namespacesAuth required

Update namespaces

Update namespaces; body is an array.

  • Authorizationheader · stringrequired

    Token from login.

  • (body)body · Namespace[]required

    Request body is a JSON array of Namespace: [{...}, ...]. Fields below are the full per-item schema (including nested).

  • idbody · stringoptional

    id

  • namebody · stringoptional

    name

  • commentbody · stringoptional

    comment

  • ownersbody · stringoptional

    owners

  • tokenbody · stringoptional

    token

  • service_export_tobody · string[]optional

    service_export_to

  • metadatabody · map<string,string>optional

    metadata

  • codebody · uint32required

    Business code; success is usually 200000.

  • infobody · stringoptional

    Info message.

  • namespacebody · Namespaceoptional

    Namespace entity fields (batch APIs nest under responses[]).

    • idbody · stringoptional

      id

    • namebody · stringoptional

      name

    • commentbody · stringoptional

      comment

    • ownersbody · stringoptional

      owners

    • tokenbody · stringoptional

      token

    • ctimebody · stringoptional

      ctime

    • mtimebody · stringoptional

      mtime

    • service_export_tobody · string[]optional

      service_export_to

    • metadatabody · map<string,string>optional

      metadata

    • total_service_countbody · uint32optional

      total_service_count

    • total_health_instance_countbody · uint32optional

      total_health_instance_count

    • total_instance_countbody · uint32optional

      total_instance_count

    • total_config_file_countbody · uint32optional

      total_config_file_count

    • editablebody · booloptional

      editable

    • deleteablebody · booloptional

      deleteable

Request
curl -sS -X PUT 'http://127.0.0.1:8090/core/v1/namespaces' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"staging","comment":"updated"}]'
Response example
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/core/v1/namespaces/deleteAuth required

Delete namespaces

Delete namespaces; body is an array with name.

  • Authorizationheader · stringrequired

    Token from login.

  • (body)body · Namespace[]required

    Request body is a JSON array of Namespace: [{...}, ...]. Fields below are the full per-item schema (including nested).

  • idbody · stringoptional

    id

  • namebody · stringoptional

    name

  • commentbody · stringoptional

    comment

  • ownersbody · stringoptional

    owners

  • tokenbody · stringoptional

    token

  • service_export_tobody · string[]optional

    service_export_to

  • metadatabody · map<string,string>optional

    metadata

  • codebody · uint32required

    Business code; success is usually 200000.

  • infobody · stringoptional

    Info message.

  • namespacebody · Namespaceoptional

    Namespace entity fields (batch APIs nest under responses[]).

    • idbody · stringoptional

      id

    • namebody · stringoptional

      name

    • commentbody · stringoptional

      comment

    • ownersbody · stringoptional

      owners

    • tokenbody · stringoptional

      token

    • ctimebody · stringoptional

      ctime

    • mtimebody · stringoptional

      mtime

    • service_export_tobody · string[]optional

      service_export_to

    • metadatabody · map<string,string>optional

      metadata

    • total_service_countbody · uint32optional

      total_service_count

    • total_health_instance_countbody · uint32optional

      total_health_instance_count

    • total_instance_countbody · uint32optional

      total_instance_count

    • total_config_file_countbody · uint32optional

      total_config_file_count

    • editablebody · booloptional

      editable

    • deleteablebody · booloptional

      deleteable

Request
curl -sS -X POST 'http://127.0.0.1:8090/core/v1/namespaces/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"staging"}]'
Response example
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
GET/core/v1/clientsAuth required

List clients

List reported clients.

  • Authorizationheader · stringrequired

    Token from login.

  • limitquery · integeroptional

    Page size.

Request
curl -sS 'http://127.0.0.1:8090/core/v1/clients?limit=20' \
  -H "Authorization: $TOKEN"
Response example
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}

On this page