Querying Abnormal Instance Information by a Specific Metric
Function
This API is used to abnormal instance information by a specific metric. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/diagnosis-instance-infos
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
metric_name |
Yes |
String |
Definition Metric name. Constraints N/A Range Default Value N/A |
|
offset |
Yes |
Integer |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value cannot be a negative number. Range ≥ 0 Default Value 0 |
|
limit |
Yes |
Integer |
Definition Number of records to be queried. Constraints The value cannot be a negative number. Range 1–100 Default Value 100 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A |
|
X-Language |
No |
String |
Definition Request language type. Constraints N/A Range Default Value en-us |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Definition Number of abnormal instances queried by the current metric. Range N/A |
|
instance_infos |
Array of InstanceInfoForDiagnosis objects |
Definition Information about the abnormal instances. |
|
Parameter |
Type |
Description |
|---|---|---|
|
instance_id |
String |
Definition Instance ID. Range The value contains 36 characters with a suffix of in07. Only letters and digits are allowed. |
|
master_node_id |
String |
Definition Primary node ID. Range The value contains 36 characters with a suffix of no07. Only letters and digits are allowed. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Request
Querying abnormal instance information based on project_id and a metric name (The information is displayed on multiple pages.)
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/diagnosis-instance-infos?metric_name=high_pressure&offset=0&limit=10
Example Response
Status code: 200
Success.
{
"total_count" : 6,
"instance_infos" : [ {
"instance_id" : "6206d5be05914703938ff9dfe5c07d34in07",
"master_node_id" : "7fe925aa8bab4cc9bac3990a94386c29no07"
}, {
"instance_id" : "cbdb32e08f0440158c4f2998dbf69b14in07",
"master_node_id" : "3e90e7b99b964dca9704b3af903fcb41no07"
}, {
"instance_id" : "325af119c2ca4e77b1deb4810a9b921bin07",
"master_node_id" : "f4dfb362039a45818e59416abc9a5ca6no07"
}, {
"instance_id" : "9e8b52a5b6e84f4a9e4db01235b1c770in07",
"master_node_id" : "408666cd6f104133ad0685b722f88cffno07"
}, {
"instance_id" : "5814254f12f74d16bd0a93885b00867fin07",
"master_node_id" : "637d96ffbf6745ff835445fe87d08fc5no07"
}, {
"instance_id" : "d0da4882ebdf44bd9d3f1edf9b0bd4a2in07",
"master_node_id" : "7a670f4ecdf14db5a4b5df737b0911a5no07"
} ]
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
Success. |
|
400 |
Client error. |
|
500 |
Server error. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.