Enabling or Disabling Collection for an Instance
Function
This API is used to enable or disable collection for a specified instance.
URI
POST /v1/apm2/openapi/apm-service/agent-mgr/change-status
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-business-id |
Yes |
Long |
Application ID. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_list |
Yes |
Array of integers |
List of Agent IDs. |
target_status |
Yes |
Integer |
Expected Agent status. Options: 0: enabled. 1: disabled. |
region |
Yes |
String |
Region where the Agent is located. |
env_id |
No |
Long |
ID of the environment to which the Agent belongs. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
flag |
String |
ok: The operation is successful. |
Example Requests
Disable data collection for instance 1097.
/v1/apm2/openapi/apm-service/agent-mgr/change-status { "instance_list" : [ 1097 ], "target_status" : 1, "region" : "xx-xxxx-xx" }
Example Responses
Status code: 200
OK: The request is successful.
Response body Download { "flag": "ok" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK: The request is successful. |
401 |
Unauthorized: No permissions. |
403 |
Forbidden: Access forbidden. |
404 |
Not Found: The requested resource is not found. |
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