Querying Instance Status in Batches
Function
Query instance status in batches.
The prerequisite for calling this API is that the tenant has purchased an instance.
The API returns the current status of the instance. Cloud status. The value can be 0 (unknown), 1 (stopped), 2 (running), 3 (being brought offline), 4 (starting), or 5 (stopped).
URI
POST /v1/instances/batch-query-status
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
x-request-id |
Yes |
String |
Unique ID of a request. |
|
X-Auth-Token |
Yes |
String |
Tenant-level token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_ids |
Yes |
Array of strings |
Instance list. A single instance can contain a maximum of 32 characters, and the list can contain a maximum of 100 columns. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Response code. The error code specification is KooPhone.API.1001, and the number increases in ascending order. |
|
error_msg |
String |
Response description. |
|
data |
StatusResultWrapper object |
Status query result. |
|
Parameter |
Type |
Description |
|---|---|---|
|
status_results |
Array of StatusResult objects |
Status query result. |
|
Parameter |
Type |
Description |
|---|---|---|
|
instance_id |
String |
Instance ID. |
|
status |
Integer |
Cloud phone status. 0: idle 1: restoring 2: data loaded 3: streaming 4: backing up 5: backup exception 6: restoration exception 7: data loaded |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/instances/batch-query-status
{
"instance_ids" : [ "a44uhlf7", "efjy72gs" ]
}
Example Responses
Status code: 200
Normal response.
{
"data" : {
"status_results" : [ {
"instance_id" : "a44uhlf7",
"status" : 0
} ]
},
"error_code" : "0",
"error_msg" : "ok"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal response. |
|
400 |
Bad Request |
|
500 |
Internal Server Error |
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