Querying Agent Statuses in Batches
Function
This API is used to query the Agent (including the uniagent) statuses.
URI
POST /v3/{project_id}/agent-status/batch-query
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. Minimum: 1 Maximum: 64 Regex Pattern: ^[a-z0-9]+$ |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Specifies the MIME type of the request body. The default type is application/json; charset=UTF-8. Default: application/json; charset=UTF-8 Minimum: 1 Maximum: 64 |
X-Auth-Token |
Yes |
String |
Specifies the user token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The value of X-Subject-Token in the response header is the token. Minimum: 1 Maximum: 16384 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_ids |
Yes |
Array of strings |
Specifies the cloud server ID list. Array Length: 1 - 2000 |
uniagent_status |
No |
String |
Specifies the uniagent status. The value can be none (not installed), running, silent, or unknown (faulty). Enumeration values:
|
extension_name |
No |
String |
Specifies the Agent name. If this parameter is not specified, all Agents are queried. Currently, only telescope can be queried. Enumeration values:
|
extension_status |
No |
String |
Specifies the Agent status. If this parameter is not specified, all statuses are queried. The value can be none (not installed), running, stopped, fault (process exception), or unknown (connection exception). Enumeration values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
agent_status |
Array of AgentStatusInfo objects |
Specifies the Agent statuses. Array Length: 1 - 2000 |
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Specifies the cloud server ID. Regex Pattern: ^[a-zA-Z0-9-]{1,64}$ |
uniagent_status |
String |
Specifies the uniagent status. The value can be none (not installed), running, silent, or unknown (faulty). Enumeration values:
|
extensions |
Array of ExtensionInfo objects |
Specifies the Agent information list. Array Length: 1 - 10 |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Specifies the Agent name. Minimum: 1 Maximum: 64 |
status |
String |
Specifies the Agent status. The value can be none (not installed), running, stopped, fault (process exception), or unknown (connection exception). Enumeration values:
|
version |
String |
Specifies the Agent version. Minimum: 1 Maximum: 32 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(ces\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(ces\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(ces\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. Regex Pattern: ^(ces\.[0-9]{4})$ |
error_msg |
String |
Specifies the error message. Minimum: 1 Maximum: 256 |
Example Requests
{ "instance_ids" : [ "111111111111" ], "uniagent_status" : "none", "extension_name" : "telescope", "extension_status" : "none" }
Example Responses
Status code: 200
Specifies the response body for querying the Agent statuses in batches.
{ "agent_status" : [ { "instance_id" : "111111111111", "uniagent_status" : "none", "extensions" : [ { "name" : "telescope", "status" : "none", "version" : "2.5.6" } ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Specifies the response body for querying the Agent statuses in batches. |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
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