Updated on 2024-04-15 GMT+08:00

Obtaining the Tag Name List

Function

This API is used to obtain the tag name list.

URI

POST /v1/{project_id}/aom/api/v1/labels

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID obtained from IAM. Generally, a project ID contains 32 characters.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Response status.

data

Array of strings

Tag value.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

status

String

Response status.

errorType

String

Error type.

error

String

Error message.

Status code: 403

Table 5 Response body parameters

Parameter

Type

Description

status

String

Response status.

errorType

String

Error type.

error

String

Error message.

Status code: 422

Table 6 Response body parameters

Parameter

Type

Description

status

String

Response status.

errorType

String

Error type.

error

String

Error message.

Status code: 503

Table 7 Response body parameters

Parameter

Type

Description

status

String

Response status.

errorType

String

Error type.

error

String

Error message.

Example Requests

Return the tag name list.

https://{EndPoint}/v1/{project_id}/aom/api/v1/labels

{
  "status" : "success",
  "data" : [ "__name__", "alarm_level", "adfname", "alertstate", "ammApplicationID", "ammApplicationName", "appID", "appName", "clusterId", "clusterName", "cluster_id", "comparisonOperator", "containerID", "containerName", "nameSpace", "namespace", "netDevice", "nodeIP", "nodeName", "node_ip", "pailId", "pailName", "period_expr", "podID", "podName", "processCmd" ]
}

Example Responses

Status code: 200

The request is successful.

{
  "status" : "success",
  "data" : [ "__name__", "alarm_level", "adfname", "alertstate", "ammApplicationID", "ammApplicationName", "appID", "appName", "clusterId", "clusterName", "cluster_id", "comparisonOperator", "containerID", "containerName", "nameSpace", "namespace", "netDevice", "nodeIP", "nodeName", "node_ip", "pailId", "pailName", "period_expr", "podID", "podName", "processCmd" ]
}

Status code: 400

Invalid request. Parameters are incorrect or missing. The client should not repeat the request without modifications.

{
  "status" : "error",
  "errorType" : "bad_param",
  "error" : "param is invalid."
}

Status code: 403

Access denied.

{
  "status" : "error",
  "errorType" : "auth",
  "error" : "auth project_id not pass."
}

Status code: 422

The expression cannot be executed.

{
  "status" : "error",
  "errorType" : "excution",
  "error" : "expression can't be executed."
}

Status code: 503

The requested service is invalid. The client should not repeat the request without modifications.

{
  "status" : "error",
  "errorType" : "timeout",
  "error" : "query timed out in query execution."
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid request. Parameters are incorrect or missing. The client should not repeat the request without modifications.

403

Access denied.

422

The expression cannot be executed.

503

The requested service is invalid. The client should not repeat the request without modifications.

Error Codes

See Error Codes.