Querying the Values of a Tag Based on Prometheus Instance
Function
This API is used to query the values of a specified tag.
URI
GET /v1/{project_id}/{prometheus_instance}/aom/api/v1/label/{label_name}/values
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID obtained from IAM. Generally, a project ID contains 32 characters. |
prometheus_instance |
Yes |
String |
Prometheus instance ID. |
label_name |
Yes |
String |
Tag specified for query. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Response status. |
data |
Array of strings |
Tag value. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
status |
String |
Response status. |
errorType |
String |
Error type. |
error |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
status |
String |
Response status. |
errorType |
String |
Error type. |
error |
String |
Error message. |
Status code: 422
Parameter |
Type |
Description |
---|---|---|
status |
String |
Response status. |
errorType |
String |
Error type. |
error |
String |
Error message. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
status |
String |
Response status. |
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 { "status" : "success", "data" : [ "node", "prometheus" ] }
Example Responses
Status code: 200
The request is successful.
{ "status" : "success", "data" : [ "node", "prometheus" ] }
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.
Feedback
Was this page helpful?
Provide feedbackThank 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