Agent Client Collector API
-
- UpdatedJan 30, 2025
- 50 minutes to read
- Yokohama
- API reference
The Agent Client Collector API provides endpoints to manage actions on available agents and managing policies.
sn_agent
namespace. The endpoints in
this API require the agent_client_collector_admin role. For more information, refer to Agent Client Collector. - Agent management endpoints
-
- Get extensive information of one or more agents. These endpoints are also accessible to users with the agent_client_collector_user role.
- Submit a request to grab an agent log and retrieving information about the request progress.
- Disable or enable agent data collection.
- Restart an agent with GET /agents/{agent_id}/restart.
- Run discovery on an agent with GET /agents/{agent_id}/discovery.
For information on performing similar tasks in a script include, see .
- Policy management and workflow
- Use policy management APIs to view details, activate/deactivate a policy, update a policy, and publish a policy.
Agent Client Collector - GET /agents/{agent_id}
Gets the information of a specified agent.
URL format
/api/sn_agent/agents/{agent_id}
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_user role. |
404 | Agent with provided ID not found. |
Response body parameters (JSON)
Example: cURL request
The following example shows how to get agent details.
Output:
Agent Client Collector - GET /agents/{agent_id}/data/off
Disables data collection for a specified agent in the up/alive state.
To determine if an agent's data collection is on or off, run the GET /agents/{agent_id} endpoint.
URL format
/api/sn_agent/agents/{agent_id}/data/off
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_admin role. |
404 | Agent not found or isn't in the up/alive state. |
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to turn off agent data collection.
Output:
Agent Client Collector - GET /agents/{agent_id}/data/on
Enables data collection for a specified agent in the up/alive state.
To determine if an agent's data collection is on or off, run the GET /agents/{agent_id} endpoint.
URL format
/api/sn_agent/agents/{agent_id}/data/on
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_admin role. |
404 | Agent not found or isn't in the up/alive state. |
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to turn on agent data collection.
Output:
Agent Client Collector - GET /agents/{agent_id}/discovery
Runs a discovery check to locate CIs related to an agent. The specified agent must be in alive/up status.
URL format
/api/sn_agent/agents/{agent_id}/discovery
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_admin role. |
404 | Agent not found or isn't in the up/alive state. |
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to run discovery on an agent with alive/up status.
Output:
Agent Client Collector - GET /agents/check_defs/{check_def_id}
Gets a specified check definition with details.
URL format
/api/sn_agent/agents/check_defs/{check_def_id}
Supported request parameters
Name | Description |
---|---|
check_def_id | Sys_id of the check definition listed
in the Check Definitions [sn_agent_check_def] table.
Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
X-Include-Check-Params | Flag that indicates whether existing check
parameter details are returned. Information for each standard and secure check
parameter is included in a JSON object.
Valid values:
Data type: Boolean Default: False |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | Check definition was not found with the sys_id provided. |
Response body parameters (JSON)
Example: cURL request
The following example shows how to get information for a specified check definition.
Output:
Agent Client Collector - GET /agents/check_defs/list
Gets a list of check definitions with details.
URL format
/api/sn_agent/agents/check_defs/list
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Name | Description |
---|---|
X-Enc-Query | An encoded query
string to
filter the check definition result list. Use null for an unfiltered list of check
definitions in the system.
Data type: String |
X-Include-Check-Params | Flag that indicates whether existing check
parameter details are returned. Information for each standard and secure check
parameter is included in a JSON object.
Valid values:
Data type: Boolean Default: False |
X-Limit | Limits the number of returned records. Set to
null to use the default value.
Data type: Number Default: 20,000 |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
Response body parameters (JSON)
Example: cURL request
The following example shows how to retrieve a list of two check definitions with parameter values.
Output:
Agent Client Collector - GET /agents/exec/background/stop/{request_id}
Stops a background check.
To start a background check, use the POST /agents/check_defs/{check_def_id}/run API.
URL format
/api/sn_agent/agents/exec/background/stop/{request_id}
Supported request parameters
Name | Description |
---|---|
request_id | The ID of a background check request generated by running the POST /agents/check_defs/{check_def_id}/run API. |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | The request with the ID provided is not found. |
Response body parameters (JSON)
Name | Description |
---|---|
None |
Example: cURL request
The following example shows how to stop a background check.
Agent Client Collector - GET /agents/exec/run/{request_id}
Gets status of the request with the given ID.
URL format
/api/sn_agent/agents/exec/run/{request_id}
Supported request parameters
Name | Description |
---|---|
request_id | The ID of a background check request generated by running the POST /agents/check_defs/{check_def_id}/run API. |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
status | Request status. Possible values:
Data type: String |
err_msg | Error message if any. Possible values:
Data type: String |
Example: cURL request
The following example shows how to get the status of a request.
Agent Client Collector - GET /agents/exec/test/{test_result_id}
Gets the test check status of the given test result.
URL format
/api/sn_agent/agents/exec/test/{test_result_id}
Supported request parameters
Name | Description |
---|---|
test_result_id | A test result ID generated by creating a test check request. |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Properties | Description |
---|---|
status | Status of the test results. Possible values:
Data type: String |
output | Output describing the status. Data type: String |
Example: cURL request
The following example shows how get result status of a completed test check request.
Agent Client Collector - GET /agents/list
Gets a list of agents with related information.
URL format
/api/sn_agent/agents/list
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
X-Enc-Query | Encoded query on the Agent Client Collectors [sn_agent_cmdb_ci_agent] table in standard Glide format. See Encoded query strings. |
X-Limit | Restricts results to a maximum number of agents. Use null or undefined for both
if they are not required.Default/Max: 20,000 Data type: Number |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_user role. |
Response body parameters (JSON)
Example: cURL request
The following example shows how to restrict results by query and number. The query returns all agents that are not in the down state with a maximum of two results.
Output:
Example: cURL request
The following example shows how to list every agent in the system. This example uses no query and no maximum number of results.
Agent Client Collector - GET /agents/{agent_id}/log
Requests the log of a specified agent with alive/up status.
URL format
/api/sn_agent/agents/{agent_id}/log
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_admin role. |
404 | Agent not found or isn't in the up/alive state. |
Response body parameters (JSON)
Name | Description |
---|---|
request_id | Sys_id of a request in the Agent Client
Collector Requests [sn_agent_request] table.
You can use this ID to retrieve the log and check its progress with the GET /agents/log/{request_id}/ endpoint. Data type: String |
Example: cURL request
The following example shows how to get a log request ID.
Output:
Agent Client Collector - GET /agents/log/{request_id}/
Checks the status of a grab log request.
Detects changes in the log retrieving request sent with GET /api/sn_agent/agents/{agent_id}/log.
URL format
/api/sn_agent/agents/log/{request_id}/
Supported request parameters
Name | Description |
---|---|
request_id | Sys_id of a request in the Agent Client
Collector Requests [sn_agent_request] table.
For the request id, run GET /api/sn_agent/agents/{agent_id}/log. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Properties | Description |
---|---|
output | Information describing the status. |
Example: cURL request
The following example shows how to use a request ID to get the status of a grab log request.
Output:
Agent Client Collector - GET /agents/policies/list
Gets a list of policies that are in published or unpublished draft state.
URL format
/api/sn_agent/agents/policies/list
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_user role. |
Response body parameters (JSON)
Example: cURL request
The following example shows how to restrict results by query and number. The query returns all active policies and the ID of the associated agent.
Output:
Agent Client Collector - GET /agents/policy/activate/{policy_id}
Activates a published policy.
For a list of published policies, use GET
/agents/policies/list. This endpoint only supports sys_ids in which the value of
the policy's publish_status property is Published
or
Published*
.
URL format
/api/sn_agent/agents/policy/activate/{policy_id}
Supported request parameters
Name | Description |
---|---|
policy_id | Sys_id of the published policy. Data type: String Table: Policies [sn_agent_policy] |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Header | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to activate a policy.
Output:
Agent Client Collector - GET /agents/policy/deactivate/{policy_id}
Deactivates a published policy.
For a list of published policies, use GET /agents/policies/list. This endpoint only supports sys_ids in which the value of the policy's publish_status property is Published
or Published*
.
URL format
/api/sn_agent/agents/policy/activate/{policy_id}
Supported request parameters
Name | Description |
---|---|
policy_id | Sys_id of the published policy. Data type: String Table: Policies [sn_agent_policy] |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Header | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to deactivate a policy.
Output:
Agent Client Collector - GET /agents/policy/publish/{policy_id}
Publishes a draft policy.
URL format
/api/sn_agent/agents/policy/publish/{policy_id}
Supported request parameters
Name | Description |
---|---|
policy_id | Sys_id of a policy in the Policies [sn_agent_policy] table that is in Draft
state or a sandbox copy.
Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Header | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to publish a policy.
Output:
Agent Client Collector - GET /agents/policy/sandbox_from_published/{policy_id}
Gets the sandbox copy of a published policy and provides policy details.
For a list of published policies, use GET
/agents/policies/list. This endpoint only supports sys_ids in which the value of
the policy's publish_status property is Published
or
Published*
.
URL format
/api/sn_agent/agents/policy/sandbox_from_published/{policy_id}
Supported request parameters
Name | Description |
---|---|
policy_id | Sys_id of the published policy. Data type: String Table: Policies [sn_agent_policy] |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Example: cURL request
The following shows how to get information of the Docker Container Metrics policy.
Output:
Agent Client Collector - GET /agents/{agent_id}/restart
Restarts a specified agent with alive/up status.
- Linux-based agents using
systemd
- Windows agents
URL format
/api/sn_agent/agents/{agent_id}/restart
Supported request parameters
Name | Description |
---|---|
agent_id | Unique ID of an agent listed in the Agent ID
column of the Agent Client Collectors [sn_agent_cmdb_ci_agent] table.
For a list of agent IDs and other details, run the GET /agents/list endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | The user does not have the agent_client_collector_admin role. |
404 | No record found with the provided sys_id or this agent does not support restart. |
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to restart an agent.
Output:
Agent Client Collector - POST /agents/check_defs/{check_def_id}/run
Runs a check against the given configuration item.
To stop a background check, use the request ID provided in the GET /agents/exec/background/stop/{request_id} API.
URL format
/api/sn_agent/agents/check_defs/{check_def_id}/run
Supported request parameters
Name | Description |
---|---|
check_def_id | Sys_id of a check definition in the Check Definitions [sn_agent_check_def] table. |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
requestId | Sys_id of the generated background check request. |
Example: cURL request
The following example shows how to run a background check and get its request ID.
Output:
Agent Client Collector - POST /agents/check_defs/{check_def_id}/test
Enables building test check requests on check definitions.
- Set the check definition to test
- Set the configuration item to run the test against
- Credential sys_id
- Credential alias id
- Credential name
URL format
/api/sn_agent/agents/check_defs/{check_def_id}/test
Supported request parameters
Name | Description |
---|---|
check_def_id | Sys_id of the check definition listed in the Check Definitions [sn_agent_check_def] table. |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
500 | Error building the test request. |
Response body parameters (JSON)
Name | Description |
---|---|
result_id | Sys_id of the test result record. |
Agent Client Collector - POST /agents/check_instances/{check_instance_id}/test
Enables building test check requests on check instances.
- Set the check instance to test
- Set the configuration item to run the test against
- Credential sys_id
- Credential alias id
- Credential name
URL format
/api/sn_agent/agents/check_instances/{check_instance_id}/test
Supported request parameters
Name | Description |
---|---|
check_instance_id | Sys_id of the check definition listed in the Check Definitions [sn_agent_check_def] table. |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
500 | Error building the test request. |
Response body parameters (JSON)
Name | Description |
---|---|
result_id | Sys_id of the test result record. |
Agent Client Collector - POST /agents/update/check/{check_id}
Updates a selected policy check.
To retrieve the properties of a policy sandbox copy, use GET /agents/policy/sandbox_from_published/{policy_id}.
URL format
/api/sn_agent/agents/update/check/{check_id}
Supported request parameters
Name | Description |
---|---|
check_id | Sys_id of a policy check sandbox copy in the Check Instances [sn_agent_check]
table. Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to update the event change and repair properties of a policy check.
Output:
Agent Client Collector - POST /agents/update/check_def_params/{check_def_param_id}
Enables changing one or more field values of a specified check parameter.
URL format
/api/sn_agent/agents/update/check_def_params/{check_def_param_id}
Supported request parameters
Name | Description |
---|---|
check_def_param_id | Sys_id of the check parameter. Data type: String Table: Check Parameter Definitions [sn_agent_check_param_def] |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | The check parameter was not found with sys_id provided. |
500 | Error updating the check parameter. |
Response body parameters (JSON)
Name | Description |
---|---|
None | Success or error message. |
Example: cURL request
The following example shows how to activate a check parameter.
Output:
Agent Client Collector - POST /agents/update/check_def_secure_params/{check_def_secure_param_id}
Enables changing one or more field values of a specified check secure parameter.
URL format
/api/sn_agent/agents/update/check_def_secure_params/{check_def_secure_param_id}
Supported request parameters
Name | Description |
---|---|
check_def_secure_param_id | Sys_id of the secure parameter. Data type: String Table: Check Secure Parameter Definitions [sn_agent_check_secure_param_def] |
Name | Description |
---|---|
None |
Name | Description |
---|---|
active | Flag that indicates whether the secure parameter is active. Valid values:
Data type: Boolean |
name | Name of the secure parameter. Data type: String |
order | Order in which the parameter is sent to the check command/script. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | The check secure parameter was not found with sys_id provided. |
500 | Error updating the check secure parameter. |
Response body parameters (JSON)
Name | Description |
---|---|
None | Success or error message. |
Example: cURL request
The following example shows how to activate a check secure parameter.
Output:
Agent Client Collector - POST /agents/update/check_defs/{check_def_id}
Enables changing one or more field values of a specified check definition.
URL format
/api/sn_agent/agents/update/check_defs/{check_def_id}
Supported request parameters
Name | Description |
---|---|
check_def_id | Sys_id of the check definition listed
in the Check Definitions [sn_agent_check_def] table.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | The check definition was not found with sys_id provided. |
500 | Error updating the check definition. |
Response body parameters (JSON)
Name | Description |
---|---|
None | Success or error message. |
Example: cURL request
The following example shows how to deactivate a check definition.
Output:
Agent Client Collector - POST /agents/update/check_param/{param_id}
Updates a selected policy check parameter.
To retrieve the properties of a policy sandbox copy, use GET /agents/policy/sandbox_from_published/{policy_id}.
URL format
/api/sn_agent/agents/update/check_param/{param_id}
Supported request parameters
Name | Description |
---|---|
param_id | Sys_id of policy check parameter sandbox copy. Data type: String Table: Check Parameters [sn_agent_check_param] |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to update several properties of a policy check parameter.
Output:
Agent Client Collector - POST /agents/update/check_secure_param/{param_id}
Updates a selected policy check secure parameter.
To retrieve the properties of a policy sandbox copy, use GET /agents/policy/sandbox_from_published/{policy_id}.
URL format
/api/sn_agent/agents/update/check_secure_param/{param_id}
Supported request parameters
Name | Description |
---|---|
param_id | Sys_id of the policy check secure parameter sandbox copy. Data type: String Table: Check Secure Parameter [sn_agent_check_secure_param] |
Name | Description |
---|---|
None |
Name | Description |
---|---|
active | Flag that indicates whether the check secure parameter is active. Valid values:
Data type: Boolean |
name | Name of the secure parameter. Data type: String |
order | Order in which the parameter is
sent to the check command/script. Data type: Number |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to update the properties of a policy check secure parameter.
Output:
Agent Client Collector - POST /agents/update/policy/{policy_id}
Updates a sandbox copy of a policy.
To retrieve the properties of a policy sandbox copy, use GET /agents/policy/sandbox_from_published/{policy_id}.
URL format
/api/sn_agent/agents/update/policy/{policy_id}
Supported request parameters
Name | Description |
---|---|
policy_id | Sys_id of a policy sandbox copy. Data type: String Table: Policies [sn_agent_policy] |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Name | Description |
---|---|
message | Message containing operation success or failure results. Data type: String |
Example: cURL request
The following example shows how to update the name and filter properties/fields of a policy.
Output:
On this page
- Agent Client Collector - GET /agents/{agent_id}
- Agent Client Collector - GET /agents/{agent_id}/data/off
- Agent Client Collector - GET /agents/{agent_id}/data/on
- Agent Client Collector - GET /agents/{agent_id}/discovery
- Agent Client Collector - GET /agents/check_defs/{check_def_id}
- Agent Client Collector - GET /agents/check_defs/list
- Agent Client Collector - GET /agents/exec/background/stop/{request_id}
- Agent Client Collector - GET /agents/exec/run/{request_id}
- Agent Client Collector - GET /agents/exec/test/{test_result_id}
- Agent Client Collector - GET /agents/list
- Agent Client Collector - GET /agents/{agent_id}/log
- Agent Client Collector - GET /agents/log/{request_id}/
- Agent Client Collector - GET /agents/policies/list
- Agent Client Collector - GET /agents/policy/activate/{policy_id}
- Agent Client Collector - GET /agents/policy/deactivate/{policy_id}
- Agent Client Collector - GET /agents/policy/publish/{policy_id}
- Agent Client Collector - GET /agents/policy/sandbox_from_published/{policy_id}
- Agent Client Collector - GET /agents/{agent_id}/restart
- Agent Client Collector - POST /agents/check_defs/{check_def_id}/run
- Agent Client Collector - POST /agents/check_defs/{check_def_id}/test
- Agent Client Collector - POST /agents/check_instances/{check_instance_id}/test
- Agent Client Collector - POST /agents/update/check/{check_id}
- Agent Client Collector - POST /agents/update/check_def_params/{check_def_param_id}
- Agent Client Collector - POST /agents/update/check_def_secure_params/{check_def_secure_param_id}
- Agent Client Collector - POST /agents/update/check_defs/{check_def_id}
- Agent Client Collector - POST /agents/update/check_param/{param_id}
- Agent Client Collector - POST /agents/update/check_secure_param/{param_id}
- Agent Client Collector - POST /agents/update/policy/{policy_id}