Querying Tag Values
Function
This API is used to query the values of a specified tag.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
aom:metric:list
List
-
-
aom:metric:get
-
URI
GET /v1/{project_id}/aom/api/v1/label/{label_name}/values
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| label_name | Yes | String | Tag specified for query. You can obtain tag names by calling the API Obtaining the Tag Name List Using the POST Method. |
| project_id | Yes | String | Project ID, which can be obtained from the console or by calling an API. For details, see Obtaining a Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token obtained from IAM. For details, see Obtaining a Token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Response status. Range: success: A success message is returned. error: A failure message is returned. |
| data | Array of strings | Tag value. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Response status. Range: success: A success message is returned. error: A failure message is returned. |
| errorType | String | Error type. |
| error | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Response status. Range: success: A success message is returned. error: A failure message is returned. |
| errorType | String | Error type. |
| error | String | Error message. |
Status code: 422
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Response status. Range: success: A success message is returned. error: A failure message is returned. |
| errorType | String | Error type. |
| error | String | Error message. |
Status code: 503
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Response status. Range: success: A success message is returned. error: A failure message is returned. |
| errorType | String | Error type. |
| error | String | Error message. |
Example Requests
Query all values of the "job" tag.
https://{EndPoint}/v1/{project_id}/aom/api/v1/label/job/values Example Responses
Status code: 200
{
"status" : "success",
"data" : [ "node", "prometheus" ]
} Status code: 400
{
"status" : "error",
"errorType" : "bad_param",
"error" : "param is invalid."
} Status code: 403
{
"status" : "error",
"errorType" : "auth",
"error" : "auth project_id not pass."
} Status code: 422
{
"status" : "error",
"errorType" : "execution",
"error" : "expression can't be executed."
} Status code: 503
{
"status" : "error",
"errorType" : "timeout",
"error" : "query timed out in query execution."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK: The request is successful. |
| 400 | Bad Request: The request is invalid. The client should not repeat the request without modifications. |
| 403 | Forbidden: The request is rejected. The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications. |
| 422 | Unprocessable: The expression cannot be executed. |
| 503 | Service Unavailable: The requested service is invalid. The client should not repeat the request without modifications. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot