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.
/core/v1/namespacesAuth requiredList namespaces
List namespaces.
Parameters
- 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.
curl -sS 'http://127.0.0.1:8090/core/v1/namespaces?limit=20' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"namespaces": [{ "name": "default" }, { "name": "pole-system" }]
}/core/v1/namespacesAuth requiredCreate namespaces
Write bodies are usually protobuf message arrays; fields below are per-object (see specification).
Parameters
- 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
Response fields
- 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
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"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/core/v1/namespacesAuth requiredUpdate namespaces
Update namespaces; body is an array.
Parameters
- 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
Response fields
- 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
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"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/core/v1/namespaces/deleteAuth requiredDelete namespaces
Delete namespaces; body is an array with name.
Parameters
- 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
Response fields
- 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
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"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/core/v1/clientsAuth requiredList clients
List reported clients.
Parameters
- Authorizationheader · stringrequired
Token from login.
- limitquery · integeroptional
Page size.
curl -sS 'http://127.0.0.1:8090/core/v1/clients?limit=20' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"amount": 1
}