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" : ""}
Example Responses
Status code: 200
OK: The request is successful.
{"flag": "ok"}
Status Codes
Status Code | Description |
---|---|
200 | OK: The request is successful. |
400 | Bad Request: Semantic or parameter error. |
401 | Unauthorized: No permissions. |
403 | Forbidden: Access forbidden. |
404 | Not Found: The requested resource is not found. |
Error Codes
See Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Requests
- Example Responses
- Status Codes
- Error Codes