AccCheckDefsAPI - Scoped
-
- UpdatedJan 30, 2025
- 9 minutes to read
- Yokohama
- API reference
The AccCheckDefsAPI script include enables managing check definitions and associated parameters.
This script include requires the Agent Client Collector Framework (sn_agent) store application and is provided within the sn_agent
namespace. This script include requires the agent_client_collector_admin role. For more information,
refer to Agent Client Collector.
This script include does not have a constructor for creating an instance. Call each method using the AccCheckDefsAPI static class in the following format:
sn_agent.AccCheckDefsAPI.<method>
For the REST API solution, refer to Agent Client Collector API.
- Get a specified check definition
- Get a list of check definitions
- Update checks and check parameters
AccCheckDefsAPI - getCheck(String checkDefId, Boolean withParams)
Gets a specified check definition with details.
Name | Type | Description |
---|---|---|
checkDefId | String | Sys_id of the check definition listed in the Check Definitions [sn_agent_check_def] table. |
withParams | Boolean | 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:
Default: False |
Example
The following example shows how to get information for a specified check definition.
Output:
AccCheckDefsAPI - getChecksList(String encodedQuery, Number limit, Boolean withParams)
Gets a list of check definitions with details.
See also Checks and policies.
Name | Type | Description |
---|---|---|
encodedQuery | String | An encoded query string to filter the check definition result list. Use null for an unfiltered list of check definitions in the system. |
limit | Number | Limits the number of returned records. Set to
null to use the default value.
Default: 20,000 |
withParams | Boolean | 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:
Default: False |
Example
The following example shows how to retrieve a list of two check definitions with parameter values.
Output:
AccCheckDefsAPI - updateCheck(String checkDefId, Object updateJson)
Enables changing one or more field values of a specified check definition.
See also Checks and policies.
Type | Description |
---|---|
None | Error message if unsuccessful. |
Example
The following example shows how to deactivate a check definition.
AccCheckDefsAPI - updateCheckParam(String checkDefParamId, Object updateJson)
Enables changing one or more field values of a specified check parameter.
Type | Description |
---|---|
None | Error message if unsuccessful. |
Example
The following example shows how to activate a check parameter.
AccCheckDefsAPI - updateCheckSecureParam(String checkDefSecureParamId, Object updateJson)
Enables changing one or more field values of a specified check secure parameter.
Type | Description |
---|---|
None | Error message if unsuccessful. |
Example
The following example shows how to activate a check secure parameter.
On this page
- AccCheckDefsAPI - getCheck(String checkDefId, Boolean withParams)
- AccCheckDefsAPI - getChecksList(String encodedQuery, Number limit, Boolean
withParams)
- AccCheckDefsAPI - updateCheck(String checkDefId, Object updateJson)
- AccCheckDefsAPI - updateCheckParam(String checkDefParamId, Object updateJson)
- AccCheckDefsAPI - updateCheckSecureParam(String checkDefSecureParamId, Object
updateJson)