{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":457,"path":"api-reference/rest-apis/agnt_clnt_cll-api.md","title":"Agent Client Collector API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Agent Client Collector API\n\nThe Agent Client Collector API provides endpoints to manage actions on available agents and managing policies.\n\nThis API requires the Agent Client Collector Framework \\(sn\\_agent\\) store application and is provided within the `sn_agent` namespace. The endpoints in this API require the agent\\_client\\_collector\\_admin role. For more information, refer to [Agent Client Collector](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-landing-page.md).\n\n-   **Agent management endpoints**\n\n    -   Get extensive information of one or more agents. These endpoints are also accessible to users with the agent\\_client\\_collector\\_user role.\n        -   [GET /agents/\\{agent\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [GET /agents/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n    -   Submit a request to grab an agent log and retrieving information about the request progress.\n        -   [GET /agents/\\{agent\\_id\\}/log](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [GET /agents/log/\\{request\\_id\\}/](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n    -   Disable or enable agent data collection.\n        -   [GET /agents/\\{agent\\_id\\}/data/off](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [GET /agents/\\{agent\\_id\\}/data/on](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n    -   Restart an agent with [GET /agents/\\{agent\\_id\\}/restart](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n    -   Run discovery on an agent with [GET /agents/\\{agent\\_id\\}/discovery](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n    For information on performing similar tasks in a script include, see [AccAgentsAPI](https://developer.servicenow.com/go_to_api.do?ID=AccAgentsAPIAPIScoped&v=utah).\n\n-   **Policy management and workflow**\n\n    Use policy management APIs to view details, activate/deactivate a policy, update a policy, and publish a policy.\n\n    To update a policy:\n\n    1.  Get a list of policies and details with [GET /agents/policies/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md). This endpoint requires the agent\\_client\\_collector\\_user role.\n        -   To update a policy in the Draft state, use the sys\\_ids retrieved from the policies list in the update endpoints.\n        -   To update a policy in Published or Published\\* state, get an editable sandbox copy with [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md). Use the sys\\_ids from this response to modify properties using an update endpoint.\n    2.  Modify policy details using an update endpoint.\n        -   [POST /agents/update/policy/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [POST /agents/update/check/\\{check\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [POST /agents/update/check\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n        -   [POST /agents/update/check\\_secure\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n    3.  Publish the policy using [GET /agents/policy/publish/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n    Once published, the policy becomes Active. This API also includes endpoints for activating or deactivating a published policy:\n\n    -   [GET /agents/policy/activate/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n    -   [GET /agents/policy/deactivate/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}\n\nGets the information of a specified agent.\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_user role.|\n|404|Agent with provided ID not found.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;Array&gt;\n\n</td><td>\n\nArray of JSON objects containing extended agent information.```\n{\n   \"agent_id\": \"String\",\n   \"data_collection\": Number,\n   \"ip_address\": \"String\",\n   \"is_duplicate\": Boolean,\n   \"is_restart_enabled\": Boolean,\n   \"name\": \"String\",\n   \"number_of_running_checks\": Number,\n   \"status\": Number,\n   \"up_since\": \"String\",\n   \"version\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nagent\\_id\n\n</td><td id=\"accAgents-parm-agent-obj-id-entry\">\n\nID of the agent as submitted.Data type: String\n\n</td></tr><tr><td>\n\ndata\\_collection\n\n</td><td id=\"accAgents-parm-agent-obj-dataCollect-entry\">\n\nData collection indicates whether scheduled checks are to be run. These checks are a part of the policies scheduled for this agent to run.Possible values:\n\n-   0: On – Checks run as scheduled.\n-   1: Off \\(manual\\) – Checks have been disabled manually.\n-   2: Off \\(auto\\) – Checks have been disabled automatically due to high CPU consumption by the\n\n Data type: Number\n\n</td></tr><tr><td>\n\nip\\_address\n\n</td><td id=\"accAgents-parm-agent-obj-ip-entry\">\n\nAgent IP address.Data type: String\n\n</td></tr><tr><td>\n\nis\\_duplicate\n\n</td><td id=\"accAgents-parm-agent-obj-dup-entry\">\n\nFlag that indicates whether this agent is a duplicate of another. There should be only a single agent on a given host.\n\n Possible values:\n\n-   true: The agent has the same host as an Alive/Up agent with a different agent ID. Turn off or uninstall the duplicate\n-   false: This agent has no duplicates in the Alive/Up state.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nis\\_restart\\_enabled\n\n</td><td id=\"accAgents-parm-agent-obj-restart-entry\">\n\nFlag that indicates whether restart is enabled. Agent restart is not configurable. It depends on the OS and the version of the OS the agent is running on.\n\n Possible values:\n\n-   true: Restart is enabled for this agent.\n-   false: Restart is disabled for this agent.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td id=\"accAgents-parm-agent-obj-name-entry\">\n\nName of the agent.Data type: String\n\n</td></tr><tr><td>\n\nnumber\\_of\\_running\\_checks\n\n</td><td id=\"accAgents-parm-agent-obj-numChecks-entry\">\n\nThe number of checks the agent is scheduled to run. These checks are a part of the policies scheduled for this agent to run.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"accAgents-parm-agent-obj-status-entry\">\n\nStatus of the agent.Possible values:\n\n-   0: Alive/Up – The agent is active.\n-   1: Warning – The agent has not received a keep-alive message in the past few minutes.\n-   2: Down – The agent has not received a keep-alive message in a long time.\n-   3: Restarting – The agent is restarting.\n\n Data type: Number\n\n</td></tr><tr><td>\n\nup\\_since\n\n</td><td id=\"accAgents-parm-agent-obj-up-entry\">\n\nUTC time since the agent's status became alive/up. The value is in [GlideDateTime](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideDateTimeScoped.md) format.Data type: String\n\n</td></tr><tr><td>\n\nversion\n\n</td><td id=\"accAgents-parm-agent-obj-version-entry\">\n\nVersion of Agent Client Collector the agent is running.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to get agent details.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<agent_id>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"name\": \"WIN-V26KAP7PI2G\",\n  \"status\": 2,\n  \"agent_id\": \"074b14e2eb3ce9d4\",\n  \"ip_address\": \"10.196.55.14\",\n  \"number_of_running_checks\": 11,\n  \"data_collection\": 0,\n  \"is_restart_enabled\": true,\n  \"is_duplicate\": false,\n  \"up_since\": \"2021-03-31 12:02:17\",\n  \"version\": \"2.3.0\"\n}\n```\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}/data/off\n\nDisables data collection for a specified agent in the up/alive state.\n\nTo determine if an agent's data collection is on or off, run the GET /agents/\\{agent\\_id\\} endpoint.\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}/data/off`\n\n### Supported request parameters\n\n<table id=\"table_oyt_cd3_dpb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|Agent not found or isn't in the up/alive state.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_owl_zyc_z4b\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to turn off agent data collection.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<agent_id>/data/off\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n\"message\": \"Data Collection Disabled For Agent With ID: <agent_id>\"\n}\n```\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}/data/on\n\nEnables data collection for a specified agent in the up/alive state.\n\nTo determine if an agent's data collection is on or off, run the GET /agents/\\{agent\\_id\\} endpoint.\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}/data/on`\n\n### Supported request parameters\n\n<table id=\"table_oyt_cd3_dpb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|Agent not found or isn't in the up/alive state.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_owl_zyc_z4b\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to turn on agent data collection.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<agent_id>/data/on\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Data Collection Enabled For Agent With ID: <agent_id>\"\n}\n```\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}/discovery\n\nRuns a discovery check to locate CIs related to an agent. The specified agent must be in alive/up status.\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}/discovery`\n\n### Supported request parameters\n\n<table id=\"table_oyt_cd3_dpb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|Agent not found or isn't in the up/alive state.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_owl_zyc_z4b\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to run discovery on an agent with alive/up status.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<agent_id>/discovery\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Running Discovery For Agent With ID: <agent_id>\"\n}\n```\n\n## Agent Client Collector - GET /agents/check\\_defs/\\{check\\_def\\_id\\}\n\nGets a specified check definition with details.\n\n### URL format\n\n`/api/sn_agent/agents/check_defs/{check_def_id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\\_def\\_id\n\n</td><td>\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nX-Include-Check-Params\n\n</td><td>\n\nFlag 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:\n\n-   true: Return check parameter details.\n-   false: Do not return check parameter details.\n\n Data type: Boolean\n\n Default: False\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|404|Check definition was not found with the sys\\_id provided.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nProperties\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\n\n</td><td>\n\nDetails of the specified check definition.```\n{\n \"background\": Boolean,\n \"check_group\": \"String\",\n \"check_type\": \"String\",\n \"command\": \"String\",\n \"error\": \"String\",\n \"name\": \"String\",\n \"params\": [Array],\n \"plugins\": [Array],\n \"proxy_valid\": Boolean,\n \"secure_params\": [Array],\n \"sys_id\": \"String\",\n \"timeout\": Number\n}\n```\n\n</td></tr><tr><td>\n\nbackground\n\n</td><td>\n\nFlag that indicates whether this check definition is a background check. A background check is a check which the agent starts execution of and doesn't wait for it to finish running. Valid values:\n\n-   true: This check definition is a background check.\n-   false: This check definition is not a background check.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\ncheck\\_group\n\n</td><td>\n\nGroup specified for this check definition. Data type: String\n\n</td></tr><tr><td>\n\ncheck\\_type\n\n</td><td>\n\nType of check. Possible values:\n\n-   Events – Check results are transformed into an Event Management event.\n-   Metrics – Values from the check result are transformed to metrics.\n\n Data type: String\n\n</td></tr><tr><td>\n\ncommand\n\n</td><td>\n\nCommand that the Agent Client Collector executes. Data type: String\n\n</td></tr><tr><td>\n\nerror\n\n</td><td>\n\nMessage if there is an error. Null otherwise.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the check. Data type: String\n\n</td></tr><tr><td>\n\nparams\n\n</td><td>\n\nList of parameter definitions associated with the check definition. These results are only included if the **withParams** parameter is set to true.```\n\"params\": [\n  {\n    \"active\": Boolean,\n    \"default_value\": \"String\",\n    \"mandatory\": Boolean,\n    \"name\": \"String\",\n    \"sys_id\": \"String\"\n   }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nparams.active\n\n</td><td>\n\nFlag that indicates whether the check parameter is active. Valid values:\n\n-   true: The check parameter is active.\n-   false: The check parameter is inactive.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nparams.default\\_value\n\n</td><td>\n\nSpecifies the default value for this check parameter. Data type: String\n\n</td></tr><tr><td>\n\nparams.mandatory\n\n</td><td>\n\nFlag that indicates whether the check parameter is required. Valid values:\n\n-   true: The check parameter is required.\n-   false: The check parameter is optional.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nparams.name\n\n</td><td>\n\nName of the check parameter. Data type: String\n\n</td></tr><tr><td>\n\nparams.sys\\_id\n\n</td><td>\n\nSys\\_id of the check parameter listed in the Check Secure Parameter Definitions \\[sn\\_agent\\_check\\_param\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\nplugins\n\n</td><td>\n\nList of [Agent Client Collector plugins](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-assets.md) associated with this check. Data type: Array\n\n</td></tr><tr><td>\n\nproxy\\_valid\n\n</td><td>\n\nFlag that indicates whether the check definition policy is set to work as a proxy. Valid values:\n\n-   true: This check definition policy is set to work as a proxy.\n-   false: This check definition policy is not set to work as a proxy.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params\n\n</td><td>\n\nList of assigned to this check. These results are only included if the **withParams** parameter is set to true.```\n\"secure_params\": [\n  {\n    \"active\": Boolean,\n    \"name\": \"String\",\n    \"order\": Number,\n    \"sys_id\": \"String\"\n   }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nsecure\\_params.active\n\n</td><td>\n\nFlag that indicates whether the secure parameter is active. Valid values:\n\n-   true: The secure parameter is active.\n-   false: The secure parameter is inactive.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params.name\n\n</td><td>\n\nName of the secure parameter. Data type: String\n\n</td></tr><tr><td>\n\nsecure\\_params.order\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script. Data type: Number\n\n</td></tr><tr><td>\n\nsecure\\_params.sys\\_id\n\n</td><td>\n\nSys\\_id of the secure parameter listed in the Check Secure Parameter Definitions \\[sn\\_agent\\_check\\_secure\\_param\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\ntimeout\n\n</td><td>\n\nTimeout in seconds. Data type: Number\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to get information for a specified check definition.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/check_defs/94436b237f705300f128134f8dfa91a4\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"name\": \"app.apache.metrics-apache\",\n  \"command\": \"metrics-apache-graphite.rb -p {{.labels.params_port}} --path {{.labels.params_path}} -h {{.labels.params_host}}\",\n  \"plugins\": [\n    \"monitoring-plugin-common\"\n  ],\n  \"timeout\": 60,\n  \"proxy_valid\": true,\n  \"background\": false,\n  \"check_type\": \"Metrics\",\n  \"check_group\": \"Apache\",\n  \"sys_id\": \"94436b237f705300f128134f8dfa91a4\",\n  \"params\": [\n    {\n      \"name\": \"port\",\n      \"active\": true,\n      \"mandatory\": true,\n      \"default_value\": \"80\",\n      \"sys_id\": \"58436b237f705300f128134f8dfa91a8\"\n    },\n    {\n      \"name\": \"path\",\n      \"active\": true,\n      \"mandatory\": true,\n      \"default_value\": \"/server-status?auto\",\n      \"sys_id\": \"98436b237f705300f128134f8dfa91aa\"\n    },\n    {\n      \"name\": \"scheme\",\n      \"active\": false,\n      \"mandatory\": false,\n      \"default_value\": null,\n      \"sys_id\": \"a4e57a96db3bbb4035305c55dc9619f6\"\n    },\n    {\n      \"name\": \"host\",\n      \"active\": true,\n      \"mandatory\": true,\n      \"default_value\": \"127.0.0.1\",\n      \"sys_id\": \"d4436b237f705300f128134f8dfa91a6\"\n    },\n    {\n      \"name\": \"ssl_secure_connection\",\n      \"active\": false,\n      \"mandatory\": false,\n      \"default_value\": null,\n      \"sys_id\": \"e3b272c4530100106ffeddeeff7b1275\"\n    }\n  ],\n  \"secure_params\": [\n    {\n      \"name\": \"cred_user_name\",\n      \"active\": true,\n      \"order\": 1,\n      \"sys_id\": \"2494cd6e53170010f42cddeeff7b1273\"\n    },\n    {\n      \"name\": \"cred_password\",\n      \"active\": true,\n      \"order\": 2,\n      \"sys_id\": \"35948d6e53170010f42cddeeff7b127f\"\n    }\n  ]\n}\n```\n\n## Agent Client Collector - GET /agents/check\\_defs/list\n\nGets a list of check definitions with details.\n\n### URL format\n\n`/api/sn_agent/agents/check_defs/list`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nX-Enc-Query\n\n</td><td>\n\nAn [encoded query string](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md) to filter the check definition result list. Use null for an unfiltered list of check definitions in the system. Data type: String\n\n</td></tr><tr><td>\n\nX-Include-Check-Params\n\n</td><td>\n\nFlag 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:\n\n-   true: Return check parameter details.\n-   false: Do not return check parameter details.\n\n Data type: Boolean\n\n Default: False\n\n</td></tr><tr><td>\n\nX-Limit\n\n</td><td>\n\nLimits the number of returned records. Set to null to use the default value. Data type: Number\n\n Default: 20,000\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck definitions\n\n</td><td>\n\nList of check definition and details provided as JSON objects.```\n[\n {\n  \"background\": Boolean,\n  \"check_group\": \"String\",\n  \"check_type\": \"String\",\n  \"command\": \"String\",\n  \"name\": \"String\",\n  \"params\": [Array],\n  \"plugins\": [Array],\n  \"proxy_valid\": Boolean,\n  \"secure_params\": [Array],\n  \"sys_id\": \"String\",\n  \"timeout\": Number \n }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nbackground\n\n</td><td id=\"accCkDf-background-desc\">\n\nFlag that indicates whether this check definition is a background check. A background check is a check which the agent starts execution of and doesn't wait for it to finish running. Valid values:\n\n-   true: This check definition is a background check.\n-   false: This check definition is not a background check.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\ncheck\\_group\n\n</td><td id=\"accCkDf-chkGrp-desc\">\n\nGroup specified for this check definition. Data type: String\n\n</td></tr><tr><td>\n\ncheck\\_type\n\n</td><td id=\"accCkDf-chkTyp-desc\">\n\nType of check. Possible values:\n\n-   Events – Check results are transformed into an Event Management event.\n-   Metrics – Values from the check result are transformed to metrics.\n\n Data type: String\n\n</td></tr><tr><td>\n\ncommand\n\n</td><td id=\"accCkDf-command-desc\">\n\nCommand that the Agent Client Collector executes. Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td id=\"accCkDf-name-desc\">\n\nName of the check. Data type: String\n\n</td></tr><tr><td>\n\nparams\n\n</td><td id=\"accCkDf-p-desc\">\n\nList of parameter definitions associated with the check definition. These results are only included if the **withParams** parameter is set to true.```\n\"params\": [\n  {\n    \"active\": Boolean,\n    \"default_value\": \"String\",\n    \"mandatory\": Boolean,\n    \"name\": \"String\",\n    \"sys_id\": \"String\"\n   }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nparams.active\n\n</td><td id=\"accCkDf-p-active-desc\">\n\nFlag that indicates whether the check parameter is active. Valid values:\n\n-   true: The check parameter is active.\n-   false: The check parameter is inactive.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nparams.default\\_value\n\n</td><td id=\"accCkDf-p-default-desc\">\n\nSpecifies the default value for this check parameter. Data type: String\n\n</td></tr><tr><td>\n\nparams.mandatory\n\n</td><td id=\"accCkDf-p-mando-desc\">\n\nFlag that indicates whether the check parameter is required. Valid values:\n\n-   true: The check parameter is required.\n-   false: The check parameter is optional.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nparams.name\n\n</td><td id=\"accCkDf-p-name-desc\">\n\nName of the check parameter. Data type: String\n\n</td></tr><tr><td>\n\nparams.sys\\_id\n\n</td><td id=\"accCkDf-p-id-desc\">\n\nSys\\_id of the check parameter listed in the Check Secure Parameter Definitions \\[sn\\_agent\\_check\\_param\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\nplugins\n\n</td><td id=\"accCkDf-plugins-desc\">\n\nList of [Agent Client Collector plugins](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-assets.md) associated with this check. Data type: Array\n\n</td></tr><tr><td>\n\nproxy\\_valid\n\n</td><td id=\"accCkDf-proxy-desc\">\n\nFlag that indicates whether the check definition policy is set to work as a proxy. Valid values:\n\n-   true: This check definition policy is set to work as a proxy.\n-   false: This check definition policy is not set to work as a proxy.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params\n\n</td><td id=\"accCkDf-sp-desc\">\n\nList of assigned to this check. These results are only included if the **withParams** parameter is set to true.```\n\"secure_params\": [\n  {\n    \"active\": Boolean,\n    \"name\": \"String\",\n    \"order\": Number,\n    \"sys_id\": \"String\"\n   }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nsecure\\_params.active\n\n</td><td id=\"accCkDf-sp-active-desc\">\n\nFlag that indicates whether the secure parameter is active. Valid values:\n\n-   true: The secure parameter is active.\n-   false: The secure parameter is inactive.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params.name\n\n</td><td id=\"accCkDf-sp-name-desc\">\n\nName of the secure parameter. Data type: String\n\n</td></tr><tr><td>\n\nsecure\\_params.order\n\n</td><td id=\"accCkDf-sp-order-desc\">\n\nOrder in which the parameter is sent to the check command/script. Data type: Number\n\n</td></tr><tr><td>\n\nsecure\\_params.sys\\_id\n\n</td><td id=\"accCkDf-sp-id-desc\">\n\nSys\\_id of the secure parameter listed in the Check Secure Parameter Definitions \\[sn\\_agent\\_check\\_secure\\_param\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td id=\"accCkDf-id-desc\">\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table. Data type: String\n\n</td></tr><tr><td>\n\ntimeout\n\n</td><td id=\"accCkDf-timeout-desc\">\n\nTimeout in seconds. Data type: Number\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to retrieve a list of two check definitions with parameter values.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/check_defs/list\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"check_definitions\": [\n    {\n      \"name\": \"checks_api_test\",\n      \"command\": \"echo hello\",\n      \"plugins\": [],\n      \"timeout\": 9,\n      \"proxy_valid\": true,\n      \"background\": false,\n      \"check_type\": \"TestCheck\",\n      \"check_group\": \"computer\",\n      \"sys_id\": \"7f1f9026dba530106f4810284b96194f\",\n      \"params\": [],\n      \"secure_params\": [\n        {\n          \"name\": \"check_api_test_check_secure_param2\",\n          \"active\": true,\n          \"order\": 2,\n          \"sys_id\": \"2d30a066dba530106f4810284b9619c1\"\n        },\n        {\n          \"name\": \"check_api_test_check_secure_param1\",\n          \"active\": true,\n          \"order\": 100,\n          \"sys_id\": \"4c20a066dba530106f4810284b9619a8\"\n        }\n      ]\n    },\n    {\n      \"name\": \"checks_api_test222\",\n      \"command\": \"echo hello1212121\",\n      \"plugins\": [],\n      \"timeout\": 60,\n      \"proxy_valid\": true,\n      \"background\": false,\n      \"check_type\": \"TestCheck\",\n      \"check_group\": \"computer\",\n      \"sys_id\": \"99e12466dba530106f4810284b961976\",\n      \"params\": [\n        {\n          \"name\": \"check_api_test_check_param_222\",\n          \"active\": true,\n          \"mandatory\": false,\n          \"default_value\": \"test_test_test\",\n          \"sys_id\": \"44026466dba530106f4810284b9619b2\"\n        }\n      ],\n      \"secure_params\": []\n    }\n  ]\n}\n```\n\n## Agent Client Collector - GET /agents/exec/background/stop/\\{request\\_id\\}\n\nStops a background check.\n\nTo start a background check, use the POST /agents/check\\_defs/\\{check\\_def\\_id\\}/run API.\n\n### URL format\n\n`/api/sn_agent/agents/exec/background/stop/{request_id}`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|request\\_id|The ID of a background check request generated by running the POST /agents/check\\_defs/\\{check\\_def\\_id\\}/run API.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|404|The request with the ID provided is not found.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### cURL request\n\nThe following example shows how to stop a background check.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/exec/background/stop/02359174db2a30108a0751f4f3961997\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\n## Agent Client Collector - GET /agents/exec/run/\\{request\\_id\\}\n\nGets status of the request with the given ID.\n\n### URL format\n\n`/api/sn_agent/agents/exec/run/{request_id}`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|request\\_id|The ID of a background check request generated by running the POST /agents/check\\_defs/\\{check\\_def\\_id\\}/run API.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|202|Message with provided ID indicating that the request is in progress.|\n|400|Error in the arguments provided in the request body.|\n|404|The request with the ID provided is not found.|\n|408|Execution timeout for the request with the ID provided.|\n|500|Error checking the status or the request with the ID provided.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nRequest status.Possible values:\n\n-   done – Check is successful.\n-   failure – Check has failed. See error message for details.\n-   mid\\_flow – Request output is being handled by the MID server.\n-   processing – Check is in progress.\n-   timeout – Check processing exceeded time limit set in the runCheckForCis\\(\\) method.\n\n Data type: String\n\n</td></tr><tr><td>\n\nerr\\_msg\n\n</td><td>\n\nError message if any.Possible values:\n\n-   No agents found for relevant CIs.\n-   No background check request with given ID.\n-   No request with given ID.\n-   No test result with given ID.\n-   Request timeout.\n\n Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to get the status of a request.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/exec/run/12fed13cdb2a30108a0751f4f3961981\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\n## Agent Client Collector - GET /agents/exec/test/\\{test\\_result\\_id\\}\n\nGets the test check status of the given test result.\n\n### URL format\n\n`/api/sn_agent/agents/exec/test/{test_result_id}`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|test\\_result\\_id|A test result ID generated by creating a test check request.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|202|Message with provided ID indicating that the request is in progress.|\n|404|The request with the ID provided is not found.|\n|408|Execution timeout for the request with the ID provided.|\n|500|Error checking the status of the request with the ID provided.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nProperties\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nStatus of the test results.Possible values:\n\n-   0: Pending\n-   1: In progress\n-   2: Complete\n-   3: No test result with given ID\n\n Data type: String\n\n</td></tr><tr><td>\n\noutput\n\n</td><td>\n\nOutput describing the status.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how get result status of a completed test check request.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/check_instances/99e12466dba530106f4810284b961976/test\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\n## Agent Client Collector - GET /agents/list\n\nGets a list of agents with related information.\n\n### URL format\n\n`/api/sn_agent/agents/list`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-JSON-only-entry-RESTAPI\">\n\nData format of the response body. Only supports **application/json**.\n\n</td></tr><tr><td>\n\nX-Enc-Query\n\n</td><td>\n\nEncoded query on the Agent Client Collectors \\[sn\\_agent\\_cmdb\\_ci\\_agent\\] table in standard Glide format. See [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).\n\n</td></tr><tr><td>\n\nX-Limit\n\n</td><td>\n\nRestricts results to a maximum number of agents. Use null or undefined for both if they are not required.Default/Max: 20,000Data type: Number\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_user role.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nProperty\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;Array&gt;\n\n</td><td>\n\nArray of JSON objects containing extended agent information.```\n[\n {\n   \"agent_id\": \"String\",\n   \"data_collection\": Number,\n   \"ip_address\": \"String\",\n   \"is_duplicate\": Boolean,\n   \"is_restart_enabled\": Boolean,\n   \"name\": \"String\",\n   \"number_of_running_checks\": Number,\n   \"status\": Number,\n   \"up_since\": \"String\",\n   \"version\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nagent\\_id\n\n</td><td id=\"accAgents-parm-agent-obj-id-entry\">\n\nID of the agent as submitted.Data type: String\n\n</td></tr><tr><td>\n\ndata\\_collection\n\n</td><td id=\"accAgents-parm-agent-obj-dataCollect-entry\">\n\nData collection indicates whether scheduled checks are to be run. These checks are a part of the policies scheduled for this agent to run.Possible values:\n\n-   0: On – Checks run as scheduled.\n-   1: Off \\(manual\\) – Checks have been disabled manually.\n-   2: Off \\(auto\\) – Checks have been disabled automatically due to high CPU consumption by the\n\n Data type: Number\n\n</td></tr><tr><td>\n\nip\\_address\n\n</td><td id=\"accAgents-parm-agent-obj-ip-entry\">\n\nAgent IP address.Data type: String\n\n</td></tr><tr><td>\n\nis\\_duplicate\n\n</td><td id=\"accAgents-parm-agent-obj-dup-entry\">\n\nFlag that indicates whether this agent is a duplicate of another. There should be only a single agent on a given host.\n\n Possible values:\n\n-   true: The agent has the same host as an Alive/Up agent with a different agent ID. Turn off or uninstall the duplicate\n-   false: This agent has no duplicates in the Alive/Up state.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nis\\_restart\\_enabled\n\n</td><td id=\"accAgents-parm-agent-obj-restart-entry\">\n\nFlag that indicates whether restart is enabled. Agent restart is not configurable. It depends on the OS and the version of the OS the agent is running on.\n\n Possible values:\n\n-   true: Restart is enabled for this agent.\n-   false: Restart is disabled for this agent.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td id=\"accAgents-parm-agent-obj-name-entry\">\n\nName of the agent.Data type: String\n\n</td></tr><tr><td>\n\nnumber\\_of\\_running\\_checks\n\n</td><td id=\"accAgents-parm-agent-obj-numChecks-entry\">\n\nThe number of checks the agent is scheduled to run. These checks are a part of the policies scheduled for this agent to run.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"accAgents-parm-agent-obj-status-entry\">\n\nStatus of the agent.Possible values:\n\n-   0: Alive/Up – The agent is active.\n-   1: Warning – The agent has not received a keep-alive message in the past few minutes.\n-   2: Down – The agent has not received a keep-alive message in a long time.\n-   3: Restarting – The agent is restarting.\n\n Data type: Number\n\n</td></tr><tr><td>\n\nup\\_since\n\n</td><td id=\"accAgents-parm-agent-obj-up-entry\">\n\nUTC time since the agent's status became alive/up. The value is in [GlideDateTime](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideDateTimeScoped.md) format.Data type: String\n\n</td></tr><tr><td>\n\nversion\n\n</td><td id=\"accAgents-parm-agent-obj-version-entry\">\n\nVersion of Agent Client Collector the agent is running.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe 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.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/list\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--header \"X-Enc-Query: agent_extended_info.status!=2\" \\\n--header \"X-Limit: 2\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n   \"agents\": [\n     {\n       \"name\": \"007-175\",\n       \"status\": 0,\n        \"agent_id\": \"007-175\",\n       \"ip_address\": \"11.222.63.66\",\n        \"number_of_running_checks\": 0,\n       \"data_collection\": 0,\n       \"is_restart_enabled\": false,\n       \"is_duplicate\": false,\n       \"up_since\": \"2021-03-24 14:36:45\",\n       \"version\": \"2.4.0\"\n     },\n     {\n       \"name\": \"win2016-dc-64bit\",\n       \"status\": 0,\n       \"agent_id\": \"007-64\",\n       \"ip_address\": \"10.222.333.42\",\n       \"number_of_running_checks\": 1,\n       \"data_collection\": 0,\n       \"is_restart_enabled\": true,\n       \"is_duplicate\": false,\n       \"up_since\": \"2021-03-24 11:04:38\",\n       \"version\": \"2.4.0\"\n     }\n   ]\n}\n```\n\n### cURL request\n\nThe following example shows how to list every agent in the system. This example uses no query and no maximum number of results.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/list\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}/log\n\nRequests the log of a specified agent with alive/up status.\n\n**Note:** To retrieve the log and check its progress, pass the request ID returned to the GET /agents/log/\\{request\\_id\\}/ endpoint.\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}/log`\n\n### Supported request parameters\n\n<table id=\"table_oyt_cd3_dpb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|Agent not found or isn't in the up/alive state.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_vpf_zyc_z4b\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nrequest\\_id\n\n</td><td>\n\nSys\\_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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to get a log request ID.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<sys_id>/log\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n\"request_id\": \"<sys_id>\"\n```\n\n## Agent Client Collector - GET /agents/log/\\{request\\_id\\}/\n\nChecks the status of a grab log request.\n\nDetects changes in the log retrieving request sent with GET /api/sn\\_agent/agents/\\{agent\\_id\\}/log.\n\n### URL format\n\n`/api/sn_agent/agents/log/{request_id}/`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nrequest\\_id\n\n</td><td>\n\nSys\\_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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Request status is done and the grabbed log is ready.|\n|202|Grab log request with provided ID is still in progress.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|Grab log request with provided ID not found.|\n|408|Grab log request timed out.|\n|500|Grab log request encountered an error.|\n\n### Response body parameters \\(JSON\\)\n\n|Properties|Description|\n|----------|-----------|\n|output|Information describing the status.|\n\n### cURL request\n\nThe following example shows how to use a request ID to get the status of a grab log request.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/log/<request_ID>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"output\": \"SensuSnReadFile OK: {\\\"component\\\":\\\"agent\\\",\\\"level\\\":\\\"info\\\",\\\"msg\\\":\\\"Agent Protection: cpu of all checks: 0%\\\",\\\"time\\\":\\\"2021-04-05T00:21:41-07:00\\\"},...\n}\n```\n\n## Agent Client Collector - GET /agents/policies/list\n\nGets a list of policies that are in published or unpublished draft state.\n\n### URL format\n\n`/api/sn_agent/agents/policies/list`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table id=\"table_d1q_x5w_dpb\" class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-JSON-only-entry-RESTAPI\">\n\nData format of the response body. Only supports **application/json**.\n\n</td></tr><tr><td>\n\nX-Enc-Query\n\n</td><td>\n\nOptional. Encoded query string in the standard platform format.\n\n</td></tr><tr><td>\n\nX-Include-Check-Params\n\n</td><td>\n\nOptional. Flag that indicates whether to return check instances and their parameters in the results.Valid values:\n\n-   true: Includes check instances and their parameters in the results.\n-   false: Do not include check instances and their parameters in the results.\n\n Default: false\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nX-Include-Checks-And-Agents\n\n</td><td>\n\nOptional. Flag that indicates whether to include check instances and agents in the results.Valid values:\n\n-   true: Includes check instances and agents in the results.\n-   false: Do not include checks and agents in the results.\n\n Default: false\n\n Data type: Boolean\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_user role.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nProperty\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicies\n\n</td><td>\n\nList of policies retrieved. Includes checks and agent in results if queried using specific request headers. For information on policies, see [default checks and policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/agent-policies-checks.md).```\n{\n  \"policies\": [\n    {\n      \"active\": Boolean,\n      \"agent_ids\": \"String\",\n      \"checks\": [Array],\n      \"cred_alias\": \"String\",\n      \"credential_alias\": \"String\",\n      \"filter\": \"String\",\n      \"interval\": \"Number\",\n      \"monitored_ci_group\": \"String\",\n      \"monitored_ci_script\": \"String\",\n      \"monitored_ci_type_filter\": Boolean,\n      \"monitored_ci_type_group\": Boolean,\n      \"monitored_ci_type_script\": \"String\",\n      \"name\": \"String\",\n      \"params\": [Array],\n      \"publish_status\": \"String\",\n      \"secure_params\": [Array],\n      \"sys_id\": \"String\",\n      \"sys_updated_on\": \"String\",\n      \"table\": \"String\"\n    }\n  ]\n}\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\npolicies.active\n\n</td><td>\n\nFlag that indicates whether the policy is active.Valid values:\n\n-   true: Policy is active.\n-   false: Policy isn't active.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.agent\\_ids\n\n</td><td>\n\nUnique ID of an agent. These results only display if the **X-Include-Checks-And-Agents** header parameter is set to true.For extended information of an agent, run the ID in the [GET /agents/\\{agent\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint.\n\nData type: String\n\nTable: In the Agent ID column of the Agent Client Collectors \\[sn\\_agent\\_cmdb\\_ci\\_agent\\] table.\n\n</td></tr><tr><td>\n\npolicies.checks\n\n</td><td>\n\nList of objects defining checks listed in the Check Instances \\[sn\\_agent\\_check\\] table. These results only display if the **X-Include-Checks-And-Agents** or **X-Include-Check-Params** header parameter is set to true.Data type: Array of Objects\n\n```\n\"checks\": [\n   {\n     \"active\": Boolean,\n     \"auto_generate\": Boolean,\n     \"check_type\": \"String\"\n     \"command_prefix\": \"String\",\n     \"command\": \"String\",\n     \"event_status_change_threshold\": Number,\n     \"event_status_repair_threshold\": Number,\n     \"interval\": Number,\n     \"name\": \"String\",\n     \"sys_id\": \"String\",\n     \"timeout\": \"String\"\n   }\n]\n```\n\nTable:\n\n</td></tr><tr><td>\n\npolicies.checks.active\n\n</td><td>\n\nFlag that indicates whether the policy check is active.Valid values:\n\n-   true: Policy check is active.\n-   false: Policy check is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.checks.auto\\_generate\n\n</td><td>\n\nFlag that indicates whether to automatically generate the command with the **command\\_prefix** value.Valid values:\n\n-   true: Automatically populate the **command** property with active parameter values.\n-   false: Command isn't automatically generated.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.checks.check\\_type\n\n</td><td>\n\nCheck type specifying the monitoring option.Possible values:\n\n-   Discovery: Check that locates CIs related to the agent.\n-   Events: The check's result is transformed into an Event Management event.\n-   Metrics: The values from the check result are transformed to metrics.\n\nData type: String\n\n</td></tr><tr><td>\n\npolicies.checks.command\n\n</td><td>\n\nCommand that the Agent Client Collector executes. Parameter taken from a template or monitored CI.**Note:** If **auto\\_generate** is true, this property is automatically populated with the prefix and flags of the active parameters listed in the **parameters** object.\n\nData type: String\n\n</td></tr><tr><td>\n\npolicies.checks.command\\_prefix\n\n</td><td>\n\nIf the **auto\\_generate** property is true, this command is used for automatic generation. The prefix consists of any portion of the command which is static \\(does not change\\), such as the script name.Data type: String\n\n</td></tr><tr><td>\n\npolicies.checks.event\\_status\\_change\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must happen before a new event is sent. Returns null if not set.For example, if this value is 3, a check whose response status changes from OK to Error generates a new event with an Error status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\npolicies.checks.event\\_status\\_repair\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must improve to close the previous event. Returns null if not set. For example, if this value is 3, a check whose response status changes from Error to OK closes the previous event and generates a new event with an OK status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\npolicies.checks.interval\n\n</td><td>\n\nAmount of time in seconds to wait between check executions. For example, a value of 60 means that the check runs every 60 seconds.Data type: Number\n\n</td></tr><tr><td>\n\npolicies.checks.name\n\n</td><td>\n\nName of the check.Data type: String\n\n</td></tr><tr><td>\n\npolicies.checks.sys\\_id\n\n</td><td>\n\nSys\\_id of the check.Data type: String\n\nTable: Check Instances \\[sn\\_agent\\_check\\]\n\n</td></tr><tr><td>\n\npolicies.checks.timeout\n\n</td><td>\n\nAmount of time, in seconds, after which the check execution stops when no output is returned. For example, a value of 60 means that when the check execution doesn't return a value for 60 seconds, the execution stops.Data type: String\n\n</td></tr><tr><td>\n\npolicies.cred\\_alias\n\n</td><td>\n\nCredential name.Data type: String\n\nTable: Credentials \\[discovery\\_credentials\\]\n\n</td></tr><tr><td>\n\npolicies.credential\\_alias\n\n</td><td>\n\nSys\\_id of the credential alias.Data type: String\n\nTable: Connection &amp; Credential Aliases \\[sys\\_alias\\]\n\n</td></tr><tr><td>\n\npolicies.filter\n\n</td><td>\n\nFilter restricting the policy's checks to monitor only the specified criteria. Data type: String\n\n</td></tr><tr><td>\n\npolicies.interval\n\n</td><td>\n\nAmount of time in seconds to wait between policy checks. For example, a value of 60 means that the check runs every 60 seconds.**Note:** The value of the **checks.interval** property overrides the value configured in this field.\n\nData type: Number\n\n</td></tr><tr><td>\n\npolicies.monitored\\_ci\\_group\n\n</td><td>\n\nName of the [CMDB groups](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/cmdb-groups.md) associated with the policy.This field is only applied if the value of the **monitored\\_ci\\_type\\_group** property is true.\n\nData type: String\n\nTable: CMDB Groups \\[cmdb\\_group\\]\n\n</td></tr><tr><td>\n\npolicies.monitored\\_ci\\_script\n\n</td><td>\n\nScript for monitoring CIs.This field is only applied if the value of the **policies.monitored\\_ci\\_type\\_script** property is true.\n\nData type: String\n\n</td></tr><tr><td>\n\npolicies.monitored\\_ci\\_type\\_filter\n\n</td><td>\n\nFlag that indicates whether filtering by CI type is enabled. The CI type is listed in the **table** property.Valid values:\n\n-   true: Filtering by checks group is enabled.\n-   false: Filtering by checks group is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.monitored\\_ci\\_type\\_group\n\n</td><td>\n\nFlag that indicates whether monitoring by CMDB group type is enabled.Valid values:\n\n-   true: CMDB group type is enabled.\n-   false: CMDB group type is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.monitored\\_ci\\_type\\_script\n\n</td><td>\n\nFlag that indicates whether the script for monitoring CIs is enabled.Valid values:\n\n-   true: Script for monitoring CIs is enabled.\n-   false: Script for monitoring CIs is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.name\n\n</td><td>\n\nName of the policy.Data type: String\n\n</td></tr><tr><td>\n\npolicies.publish\\_status\n\n</td><td>\n\nIndicates whether the policy is published. Possible values:\n\n-   Draft: Policy has not been published and is editable using the update endpoints.\n-   Published: Policy is published. The draft \\(sandbox copy\\) and published copy are identical.\n-   Published\\*: Policy is published, but the draft copy \\(sandbox view\\) has changes not found in the published copy.\n\nData type: String\n\n</td></tr><tr><td>\n\npolicies.sys\\_id\n\n</td><td>\n\nSys\\_id of the policy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr><tr><td>\n\npolicies.sys\\_updated\\_on\n\n</td><td>\n\nDate and time that the policy was last updated.Data type: String\n\n</td></tr><tr><td>\n\npolicies.table\n\n</td><td>\n\nMonitored CI-type field on the policy. This field is only applied if **monitored\\_ci\\_type\\_filter** is true.Data type: String\n\n</td></tr><tr><td>\n\npolicies.params\n\n</td><td>\n\nList of objects containing information of check parameters. These results only display if the **X-Include-Check-Params** header parameter is set to true.Data type: Array of Objects\n\n```\n\"params\": [\n  {\n    \"active\": Boolean,\n    \"flag\": \"String\",\n    \"mandatory: Boolean,\n    \"name\": \"String\",\n    \"sys_id\": \"String\",\n    \"value\": \"String\",\n    \"value_required\": Boolean\n  }\n]\n```\n\nTable: Check Parameters \\[sn\\_agent\\_check\\_param\\]\n\n</td></tr><tr><td>\n\npolicies.params.active\n\n</td><td>\n\nFlag that indicates whether the check parameter is active.Valid values:\n\n-   true: Check parameter is active.\n-   false: Check parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.params.flag\n\n</td><td>\n\nParameter flag to use during check invocation.Data type: String\n\n</td></tr><tr><td>\n\npolicies.params.mandatory\n\n</td><td>\n\nFlag that indicates whether this check is mandatory.Valid values:\n\n-   true: This check is mandatory.\n-   false: This check is optional.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.params.name\n\n</td><td>\n\nName of the parameter.Data type: String\n\n</td></tr><tr><td>\n\npolicies.params.sys\\_id\n\n</td><td>\n\nSys\\_id of the parameter.Data type: String\n\nTable: Check Parameters \\[sn\\_agent\\_check\\_param\\]\n\n</td></tr><tr><td>\n\npolicies.params.value\n\n</td><td>\n\nValue of the parameter.Data type: String\n\n</td></tr><tr><td>\n\npolicies.params.value\\_required\n\n</td><td>\n\nFlag that indicates whether the information provided by the value property is required.Valid values:\n\n-   true: The value property is required.\n-   false: The value property is null or not required.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.secure\\_params\n\n</td><td>\n\nList of objects containing information of check secure parameters. For more information, see [Create a secure parameter for a check](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-create-secure-params.md). These results only display if the **X-Include-Check-Params** header parameter is set to true.Data type: Array of Objects\n\n```\n\"secure_params\": [\n   {\n     \"active\": Boolean,\n     \"name\": \"String\",\n     \"order\": Number,\n     \"sys_id\": \"String\"\n   }\n]\n```\n\nTable: Check Secure Parameters \\[sn\\_agent\\_check\\_secure\\_param\\]\n\n</td></tr><tr><td>\n\npolicies.secure\\_params.active\n\n</td><td>\n\nFlag that indicates whether the check secure parameter is active.Valid values:\n\n-   true: The check secure parameter is active.\n-   false: The check secure parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npolicies.secure\\_params.name\n\n</td><td>\n\nName of the secure parameter.Data type: String\n\n</td></tr><tr><td>\n\npolicies.secure\\_params.order\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script.Data type: Number\n\n</td></tr><tr><td>\n\npolicies.secure\\_params.sys\\_id\n\n</td><td>\n\nSys\\_id of the record.Data type: String\n\nTable: Check Secure Parameter \\[sn\\_agent\\_check\\_secure\\_param\\]\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to restrict results by query and number. The query returns all active policies and the ID of the associated agent.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/policies/list\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--header 'X-Enc-Query: active=true ' \\\n--header 'X-Include-Checks-And-Agents: true' \\\n--user 'username' : 'password'\n```\n\nOutput:\n\n```\n{\n  \"policies\": [\n    {\n      \"name\": \"Basic Discovery\",\n      \"sys_id\": \"68bfd27c536113006dfeddeeff7b12be\",\n      \"active\": \"true\",\n      \"interval\": \"43200\",\n      \"sys_updated_on\": \"2020-07-21 10:14:12\",\n      \"monitored_ci_type_filter\": \"true\",\n      \"filter\": \"discovery_source=AgentClientCollector^ORlast_discoveredRELATIVELT@dayofweek@ago@14\",\n      \"table\": \"cmdb_ci_server\",\n      \"monitored_ci_type_script\": \"false\",\n      \"monitored_ci_script\": \"/*\\n      Provide a script to get monitored CI type. ...\",\n      \"monitored_ci_type_group\": \"false\",\n      \"monitored_ci_group\": \"null// group name as seen in cmdb_group table\",\n      \"cred_alias\": \"null// credential name as seen in discovery_credentials table\",\n      \"credential_alias\": \"null// credential alias sys id as seen in sys_alias table\",\n      \"publish_status\": \"Published\",\n      \"checks\": [\n        {\n          \"name\": \"check-discovery-basic\",\n          \"sys_id\": \"5b10c644c7e10010b9a4362c14c260aa\",\n          \"active\": \"true\",\n          \"command\": \"check_discover.rb\",\n          \"command_prefix\": \"check_discover.rb\",\n          \"auto_generate\": \"true\",\n          \"timeout\": \"60\",\n          \"interval\": \"43200\",\n          \"event_status_change_threshold\": null,\n          \"event_status_repair_threshold\": null,\n          \"check_type\": \"Discovery\"\n        }\n      ],\n      \"agent_ids\": \"b1faba21b066256f,a088b75b1b25b0a0\"\n    }\n  ]\n}\n```\n\n## Agent Client Collector - GET /agents/policy/activate/\\{policy\\_id\\}\n\nActivates a published policy.\n\nFor a list of published policies, use [GET /agents/policies/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md). This endpoint only supports sys\\_ids in which the value of the policy's **publish\\_status** property is `Published` or `Published*`.\n\n### URL format\n\n`/api/sn_agent/agents/policy/activate/{policy_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicy\\_id\n\n</td><td id=\"agntCC-entry-parm-policyID-pub\">\n\nSys\\_id of the published policy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_h5l_bgs_2pb\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to activate a policy.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/policy/activate/<sys_id>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username' : 'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - GET /agents/policy/deactivate/\\{policy\\_id\\}\n\nDeactivates a published policy.\n\nFor a list of published policies, use [GET /agents/policies/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md). This endpoint only supports sys\\_ids in which the value of the policy's **publish\\_status** property is `Published` or `Published*`.\n\n### URL format\n\n`/api/sn_agent/agents/policy/activate/{policy_id}`\n\n### Supported request parameters\n\n<table id=\"table_f4v_qfs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicy\\_id\n\n</td><td id=\"agntCC-entry-parm-policyID-pub\">\n\nSys\\_id of the published policy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_h5l_bgs_2pb\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to deactivate a policy.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/policy/deactivate/<sys_id>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username' : 'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - GET /agents/policy/publish/\\{policy\\_id\\}\n\nPublishes a draft policy.\n\nUse any of the following endpoints to modify a draft or sandbox copy prior to publishing:\n\n-   [POST /agents/update/policy/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check/\\{check\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check\\_secure\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n\n### URL format\n\n`/api/sn_agent/agents/policy/publish/{policy_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicy\\_id\n\n</td><td>\n\nSys\\_id of a policy in the Policies \\[sn\\_agent\\_policy\\] table that is in Draft state or a sandbox copy.-   For a list of policies and details including publish state, use [GET /agents/policies/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n-   To retrieve sandbox copy of a policy, use [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_h5l_bgs_2pb\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to publish a policy.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/policy/publish/<sys_id>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username' : 'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}\n\nGets the sandbox copy of a published policy and provides policy details.\n\nUse the sandbox copy to make updates to a policy and publish. You can use the sys\\_ids in the response body to work with the following endpoints:\n\n-   [POST /agents/update/policy/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check/\\{check\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n-   [POST /agents/update/check\\_secure\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md)\n\nFor a list of published policies, use [GET /agents/policies/list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md). This endpoint only supports sys\\_ids in which the value of the policy's **publish\\_status** property is `Published` or `Published*`.\n\n### URL format\n\n`/api/sn_agent/agents/policy/sandbox_from_published/{policy_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicy\\_id\n\n</td><td id=\"agntCC-entry-parm-policyID-pub\">\n\nSys\\_id of the published policy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nProperty\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;Object&gt;\n\n</td><td>\n\nExtended details of the sandbox copy associated with the policy. For information on policies, see [default checks and policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/agent-policies-checks.md).```\n{\n  \"active\": Boolean\"\n  \"agent_ids\": \"String\",\n  \"checks\": [Array],\n  \"cred_alias\": \"String\",\n  \"credential_alias\": \"String\",\n  \"filter\": \"String\",\n  \"interval\": \"Number\",\n  \"monitored_ci_group\": \"String\",\n  \"monitored_ci_script\": \"String\",\n  \"monitored_ci_type_filter\": Boolean,\n  \"monitored_ci_type_group\": Boolean,\n  \"monitored_ci_type_script\": \"String\",\n  \"name\": \"String\",\n  \"params\": [Array],\n  \"publish_status\": \"String\",\n  \"secure_params\": [Array],\n  \"sys_id\": \"String\",\n  \"sys_updated_on\": \"String\",\n  \"table\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the policy is active.Valid values:\n\n-   true: Policy is active.\n-   false: Policy isn't active.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nagent\\_ids\n\n</td><td>\n\nUnique ID of an agent. These results only display if the **X-Include-Checks-And-Agents** header parameter is set to true.For extended information of an agent, run the ID in the [GET /agents/\\{agent\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint.\n\nData type: String\n\nTable: In the Agent ID column of the Agent Client Collectors \\[sn\\_agent\\_cmdb\\_ci\\_agent\\] table.\n\n</td></tr><tr><td>\n\nchecks\n\n</td><td>\n\nList of objects defining checks listed in the Check Instances \\[sn\\_agent\\_check\\] table. ```\n\"checks\": [\n   {\n     \"active\": Boolean,\n     \"auto_generate\": Boolean,\n     \"check_type\": \"String\"\n     \"command_prefix\": \"String\",\n     \"command\": \"String\",\n     \"event_status_change_threshold\": Number,\n     \"event_status_repair_threshold\": Number,\n     \"interval\": Number,\n     \"name\": \"String\",\n     \"sys_id\": \"String\",\n     \"timeout\": \"String\"\n   }\n]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\nchecks.active\n\n</td><td>\n\nFlag that indicates whether the policy check is active.Valid values:\n\n-   true: Policy check is active.\n-   false: Policy check is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nchecks.auto\\_generate\n\n</td><td>\n\nFlag that indicates whether to automatically generate the command with the **command\\_prefix** value.Valid values:\n\n-   true: Automatically populate the **command** property with active parameter values.\n-   false: Command isn't automatically generated.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nchecks.check\\_type\n\n</td><td>\n\nCheck type specifying the monitoring option.Possible values:\n\n-   Discovery: Check that locates CIs related to the agent.\n-   Events: The check's result is transformed into an Event Management event.\n-   Metrics: The values from the check result are transformed to metrics.\n\nData type: String\n\n</td></tr><tr><td>\n\nchecks.command\n\n</td><td>\n\nCommand that the Agent Client Collector executes. Parameter taken from a template or monitored CI.**Note:** If **auto\\_generate** is true, this property is automatically populated with the prefix and flags of the active parameters listed in the **parameters** object.\n\nData type: String\n\n</td></tr><tr><td>\n\nchecks.command\\_prefix\n\n</td><td>\n\nIf the **auto\\_generate** property is true, this command is used for automatic generation. The prefix consists of any portion of the command which is static \\(does not change\\), such as the script name.Data type: String\n\n</td></tr><tr><td>\n\nchecks.event\\_status\\_change\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must happen before a new event is sent. Returns null if not set.For example, if this value is 3, a check whose response status changes from OK to Error generates a new event with an Error status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\nchecks.event\\_status\\_repair\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must improve to close the previous event. Returns null if not set. For example, if this value is 3, a check whose response status changes from Error to OK closes the previous event and generates a new event with an OK status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\nchecks.interval\n\n</td><td>\n\nAmount of time in seconds to wait between check executions. For example, a value of 60 means that the check runs every 60 seconds.Data type: Number\n\n</td></tr><tr><td>\n\nchecks.name\n\n</td><td>\n\nName of the check.Data type: String\n\n</td></tr><tr><td>\n\nchecks.sys\\_id\n\n</td><td>\n\nSys\\_id of the check. The [POST /agents/update/check/\\{check\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint takes this value to update the sandbox copy.Data type: String\n\nTable: Check Instances \\[sn\\_agent\\_check\\]\n\n</td></tr><tr><td>\n\nchecks.timeout\n\n</td><td>\n\nAmount of time, in seconds, after which the check execution stops when no output is returned. For example, a value of 60 means that when the check execution doesn't return a value for 60 seconds, the execution stops.Data type: String\n\n</td></tr><tr><td>\n\ncred\\_alias\n\n</td><td>\n\nCredential name.Data type: String\n\nTable: Credentials \\[discovery\\_credentials\\]\n\n</td></tr><tr><td>\n\ncredential\\_alias\n\n</td><td>\n\nSys\\_id of the credential alias.Data type: String\n\nTable: Connection &amp; Credential Aliases \\[sys\\_alias\\]\n\n</td></tr><tr><td>\n\nfilter\n\n</td><td>\n\nFilter restricting the policy's checks to monitor only the specified criteria. Data type: String\n\n</td></tr><tr><td>\n\ninterval\n\n</td><td>\n\nAmount of time in seconds to wait between policy checks. For example, a value of 60 means that the check runs every 60 seconds.**Note:** The value of the **checks.interval** property overrides the value configured in this field.\n\nData type: Number\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_group\n\n</td><td>\n\nName of the [CMDB groups](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/cmdb-groups.md) associated with the policy.This field is only applied if the value of the **monitored\\_ci\\_type\\_group** property is true.\n\nData type: String\n\nTable: CMDB Groups \\[cmdb\\_group\\]\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_script\n\n</td><td>\n\nScript for monitoring CIs.This field is only applied if the value of the **policies.monitored\\_ci\\_type\\_script** property is true.\n\nData type: String\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_filter\n\n</td><td>\n\nFlag that indicates whether filtering by CI type is enabled. The CI type is listed in the **table** property.Valid values:\n\n-   true: Filtering by checks group is enabled.\n-   false: Filtering by checks group is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_group\n\n</td><td>\n\nFlag that indicates whether monitoring by CMDB group type is enabled.Valid values:\n\n-   true: CMDB group type is enabled.\n-   false: CMDB group type is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_script\n\n</td><td>\n\nFlag that indicates whether the script for monitoring CIs is enabled.Valid values:\n\n-   true: Script for monitoring CIs is enabled.\n-   false: Script for monitoring CIs is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the policy.Data type: String\n\n</td></tr><tr><td>\n\npublish\\_status\n\n</td><td>\n\nIndicates whether the policy is published. Possible values:\n\n-   Draft: Policy has not been published and is editable using the update endpoints.\n-   Published: Policy is published. The draft \\(sandbox copy\\) and published copy are identical.\n-   Published\\*: Policy is published, but the draft copy \\(sandbox view\\) has changes not found in the published copy.\n\nData type: String\n\n</td></tr><tr><td>\n\nparams\n\n</td><td>\n\nList of objects containing information of check parameters. These results only display if the **X-Include-Check-Params** header parameter is set to true.Data type: Array of Objects\n\n```\n\"params\": [\n  {\n    \"active\": Boolean,\n    \"flag\": \"String\",\n    \"mandatory: Boolean,\n    \"name\": \"String\",\n    \"sys_id\": \"String\",\n    \"value\": \"String\",\n    \"value_required\": Boolean\n  }\n]\n```\n\nTable: Check Parameters \\[sn\\_agent\\_check\\_param\\]\n\n</td></tr><tr><td>\n\nparams.active\n\n</td><td>\n\nFlag that indicates whether the check parameter is active.Valid values:\n\n-   true: Check parameter is active.\n-   false: Check parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nparams.flag\n\n</td><td>\n\nParameter flag to use during check invocation.Data type: String\n\n</td></tr><tr><td>\n\nparams.mandatory\n\n</td><td>\n\nFlag that indicates whether this check is mandatory.Valid values:\n\n-   true: This check is mandatory.\n-   false: This check is optional.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nparams.name\n\n</td><td>\n\nName of the parameter.Data type: String\n\n</td></tr><tr><td>\n\nparams.sys\\_id\n\n</td><td>\n\nSys\\_id of the parameter listed in the Check Parameters \\[sn\\_agent\\_check\\_param\\] table. The [POST /agents/update/check\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint takes this value to update the sandbox copy.Data type: String\n\n</td></tr><tr><td>\n\nparams.value\n\n</td><td>\n\nValue of the parameter.Data type: String\n\n</td></tr><tr><td>\n\nparams.value\\_required\n\n</td><td>\n\nFlag that indicates whether the information provided by the value property is required.Valid values:\n\n-   true: The value property is required.\n-   false: The value property is null or not required.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params\n\n</td><td>\n\nList of objects containing information of check secure parameters. For more information, see [Create a secure parameter for a check](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-create-secure-params.md). These results only display if the **X-Include-Check-Params** header parameter is set to true.Data type: Array of Objects\n\n```\n\"secure_params\": [\n   {\n     \"active\": Boolean,\n     \"name\": \"String\",\n     \"order\": Number,\n     \"sys_id\": \"String\"\n   }\n]\n```\n\nTable: Check Secure Parameters \\[sn\\_agent\\_check\\_secure\\_param\\]\n\n</td></tr><tr><td>\n\nsecure\\_params.active\n\n</td><td>\n\nFlag that indicates whether the check secure parameter is active.Valid values:\n\n-   true: The check secure parameter is active.\n-   false: The check secure parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nsecure\\_params.name\n\n</td><td>\n\nName of the secure parameter.Data type: String\n\n</td></tr><tr><td>\n\nsecure\\_params.order\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script.Data type: Number\n\n</td></tr><tr><td>\n\nsecure\\_params.sys\\_id\n\n</td><td>\n\nSys\\_id of the record. The [POST /agents/update/check\\_secure\\_param/\\{param\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint takes this value to update the sandbox copy.Data type: String\n\nTable: Check Secure Parameter \\[sn\\_agent\\_check\\_secure\\_param\\]\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the policy. The [POST /agents/update/policy/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md) endpoint takes this value to update the sandbox copy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr><tr><td>\n\nsys\\_updated\\_on\n\n</td><td>\n\nDate and time that the policy was last updated.Data type: String\n\n</td></tr><tr><td>\n\ntable\n\n</td><td>\n\nMonitored CI-type field on the policy. This field is only applied if **monitored\\_ci\\_type\\_filter** is true.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following shows how to get information of the Docker Container Metrics policy.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/policy/sandbox_from_published/<sys_id>\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"name\": \"Docker Container Metrics\",\n  \"sys_id\": \"b01e609a1b9fe4943e7f0b05464bcb91\",\n  \"active\": \"false\",\n  \"interval\": \"60\",\n  \"sys_updated_on\": \"2021-04-05 19:52:28\",\n  \"monitored_ci_type_filter\": \"true\",\n  \"filter\": \"operational_status=1\",\n  \"table\": \"cmdb_ci_docker_container\",\n  \"monitored_ci_type_script\": \"false\",\n  \"monitored_ci_script\": \"/*\\n Provide a script to get monitored CI type.\",\n  \"monitored_ci_type_group\": \"false\",\n  \"monitored_ci_group\": \"null// group name as seen in cmdb_group table\",\n  \"cred_alias\": \"null// credential name as seen in discovery_credentials table\",\n  \"credential_alias\": \"null// credential alias sys id as seen in sys_alias table\",\n  \"publish_status\": \"Published\",\n  \"checks\": [\n    {\n      \"name\": \"container.docker.metrics-docker\",\n      \"sys_id\": \"701e609a1b9fe4943e7f0b05464bcb94\",\n      \"active\": \"true\",\n      \"command\": \"metrics-docker-stats.rb -N {{.labels.params_ci_container_id}} -P -n -i\",\n      \"command_prefix\": \"metrics-docker-stats.rb -N {{.labels.params_ci_container_id}}\",\n      \"auto_generate\": \"true\",\n      \"timeout\": \"60\",\n      \"interval\": \"60\",\n      \"event_status_change_threshold\": null,\n      \"event_status_repair_threshold\": null,\n      \"check_type\": \"Metrics\",\n      \"params\": [\n        {\n          \"name\": \"scheme\",\n          \"sys_id\": \"c11e609a1b9fe4943e7f0b05464bcb97\",\n          \"value\": null,\n          \"active\": \"false\",\n          \"mandatory\": \"false\",\n          \"value_required\": \"true\",\n          \"flag\": \"-s\"\n        },\n        ...\n        {\n          \"name\": \"docker_host\",\n          \"sys_id\": \"cd1e609a1b9fe4943e7f0b05464bcb97\",\n          \"value\": null,\n          \"active\": \"false\",\n          \"mandatory\": \"false\",\n          \"value_required\": \"true\",\n          \"flag\": \"-H\"\n        }\n      ],\n      \"secure_params\": []\n    }\n  ]\n}\n```\n\n## Agent Client Collector - GET /agents/\\{agent\\_id\\}/restart\n\nRestarts a specified agent with alive/up status.\n\nIf Agent Client Collector performance issues occur, you can restart the agent. Manual restart is supported in the following environments:\n\n-   Linux-based agents using `systemd`\n-   Windows agents\n\n### URL format\n\n`/api/sn_agent/agents/{agent_id}/restart`\n\n### Supported request parameters\n\n<table id=\"table_oyt_cd3_dpb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nagent\\_id\n\n</td><td>\n\nUnique 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.\n\n Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id or this agent does not support restart.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_owl_zyc_z4b\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to restart an agent.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/<agent_id>/restart\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Restarting Agent With ID: <agent_id>\"\n}\n```\n\n## Agent Client Collector - POST /agents/check\\_defs/\\{check\\_def\\_id\\}/run\n\nRuns a check against the given configuration item.\n\nTo stop a background check, use the request ID provided in the GET /agents/exec/background/stop/\\{request\\_id\\} API.\n\n### URL format\n\n`/api/sn_agent/agents/check_defs/{check_def_id}/run`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|check\\_def\\_id|Sys\\_id of a check definition in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_cvh_5gq_wqb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nparams\n\n</td><td>\n\nMap of parameter names and values. These settings can be used to override the parameter records of the check definition and its specified values. ```\n\"params\": {\n  \"<parameter name>\": \"String\"\n}\n```\n\n Data type: Object\n\n</td></tr><tr><td>\n\npriority\n\n</td><td>\n\nPriority of the request to be set on the ECC queue. Possible values:\n\n-   0: interactive\n-   1: expedited\n-   2: standard\n\n Data type: Number\n\n</td></tr><tr><td>\n\nquery\n\n</td><td>\n\nEncoded query for retrieving the GlideRecord from the table specified in the **table** property.Data type: String\n\n</td></tr><tr><td>\n\ntable\n\n</td><td>\n\nName of the cmdb\\_ci table for this background check.Data type: String\n\n</td></tr><tr><td>\n\ntimeout\n\n</td><td>\n\nValue of the timeout for the request in seconds. Data type: Number\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|The is an error in the arguments provided in the request body.|\n|404|The check definition with the ID provided is not found.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|requestId|Sys\\_id of the generated background check request.|\n\n### cURL request\n\nThe following example shows how to run a background check and get its request ID.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/check_defs/a90d3c361be1301060d2773ad54bcb6f/run\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\\\"table\\\":\\\"sn_agent_check_def\\\"}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"request_id\": \"278c0170db2a30108a0751f4f3961926\"\n}\n```\n\n## Agent Client Collector - POST /agents/check\\_defs/\\{check\\_def\\_id\\}/test\n\nEnables building test check requests on check definitions.\n\nUse this API for the following tasks:\n\n-   Set the check definition to test\n-   Set the configuration item to run the test against\n\nYou can also specify one of the following identifiers to use during the test:\n\n-   Credential sys\\_id\n-   Credential alias id\n-   Credential name\n\n### URL format\n\n`/api/sn_agent/agents/check_defs/{check_def_id}/test`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|check\\_def\\_id|Sys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|ci\\_id|Sys\\_id of a CMDB Configuration Item.|\n|credentials\\_id|Sys\\_id of a credentials record.|\n|credentials\\_name|Name of the credentials record.|\n|credentials\\_alias\\_id|Sys\\_id of a credentials alias record.|\n|credentials\\_alias\\_name|Name of a credentials alias.|\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|500|Error building the test request.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|result\\_id|Sys\\_id of the test result record.|\n\n## Agent Client Collector - POST /agents/check\\_instances/\\{check\\_instance\\_id\\}/test\n\nEnables building test check requests on check instances.\n\nUse this API for the following tasks:\n\n-   Set the check instance to test\n-   Set the configuration item to run the test against\n\nYou can also specify one of the following identifiers to use during the test:\n\n-   Credential sys\\_id\n-   Credential alias id\n-   Credential name\n\n### URL format\n\n`/api/sn_agent/agents/check_instances/{check_instance_id}/test`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|check\\_instance\\_id|Sys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table.|\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|ci\\_id|Sys\\_id of a CMDB Configuration Item.|\n|credentials\\_id|Sys\\_id of a credentials record.|\n|credentials\\_name|Name of the credentials record.|\n|credentials\\_alias\\_id|Sys\\_id of a credentials alias record.|\n|credentials\\_alias\\_name|Name of a credentials alias.|\n|proxy\\_agent\\_id|Unique ID of an agent proxy to run this check. This value is listed in the Agent ID column of the Agent Client Collectors \\[sn\\_agent\\_cmdb\\_ci\\_agent\\] table.|\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|500|Error building the test request.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|result\\_id|Sys\\_id of the test result record.|\n\n## Agent Client Collector - POST /agents/update/check/\\{check\\_id\\}\n\nUpdates a selected policy check.\n\nTo retrieve the properties of a policy sandbox copy, use [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\n### URL format\n\n`/api/sn_agent/agents/update/check/{check_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\\_id\n\n</td><td>\n\nSys\\_id of a policy check sandbox copy in the Check Instances \\[sn\\_agent\\_check\\] table.Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_xvx_g2z_2pb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the policy check is active.Valid values:\n\n-   true: Policy check is active.\n-   false: Policy check is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nauto\\_generate\n\n</td><td>\n\nFlag that indicates whether to automatically generate the command with the **command\\_prefix** value.Valid values:\n\n-   true: Automatically populate the **command** property with active parameter values.\n-   false: Command isn't automatically generated.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\ncheck\\_type\n\n</td><td>\n\nCheck type specifying the monitoring option.Possible values:\n\n-   Discovery: Check that locates CIs related to the agent.\n-   Events: The check's result is transformed into an Event Management event.\n-   Metrics: The values from the check result are transformed to metrics.\n\nData type: String\n\n</td></tr><tr><td>\n\ncommand\n\n</td><td>\n\nCommand that the Agent Client Collector executes. Parameter taken from a template or monitored CI.**Note:** If **auto\\_generate** is true, this property is automatically populated with the prefix and flags of the active parameters listed in the **parameters** object.\n\nData type: String\n\n</td></tr><tr><td>\n\ncommand\\_prefix\n\n</td><td>\n\nIf the **auto\\_generate** property is true, this command is used for automatic generation. The prefix consists of any portion of the command which is static \\(does not change\\), such as the script name.Data type: String\n\n</td></tr><tr><td>\n\nevent\\_status\\_change\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must happen before a new event is sent. Returns null if not set.For example, if this value is 3, a check whose response status changes from OK to Error generates a new event with an Error status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\nevent\\_status\\_repair\\_threshold\n\n</td><td>\n\nNumber of consecutive times that a check's response status must improve to close the previous event. Returns null if not set. For example, if this value is 3, a check whose response status changes from Error to OK closes the previous event and generates a new event with an OK status after the third consecutive occurrence of the status change.\n\nData type: Number\n\n</td></tr><tr><td>\n\ninterval\n\n</td><td>\n\nAmount of time in seconds to wait between check executions. For example, a value of 60 means that the check runs every 60 seconds.Data type: Number\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the check.Data type: String\n\n</td></tr><tr><td>\n\ntimeout\n\n</td><td>\n\nAmount of time, in seconds, after which the check execution stops when no output is returned. For example, a value of 60 means that when the check execution doesn't return a value for 60 seconds, the execution stops.Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_ewx_g2z_2pb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to update the event change and repair properties of a policy check.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check/<check_sys_id>\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n    \\\"event_status_change_threshold\\\" : \\\"2\\\",\n    \\\"event_status_repair_threshold\\\" : \\\"1\\\"\n}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - POST /agents/update/check\\_def\\_params/\\{check\\_def\\_param\\_id\\}\n\nEnables changing one or more field values of a specified check parameter.\n\n### URL format\n\n`/api/sn_agent/agents/update/check_def_params/{check_def_param_id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\\_def\\_param\\_id\n\n</td><td>\n\nSys\\_id of the check parameter.Data type: String\n\nTable: Check Parameter Definitions \\[sn\\_agent\\_check\\_param\\_def\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_fhm_klr_wqb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the check parameter is active.Valid values:\n\n-   true: The check parameter is active.\n-   false: The check parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\ndefault\\_value\n\n</td><td>\n\nSpecifies the default value for this check parameter.Data type: String\n\n</td></tr><tr><td>\n\nmandatory\n\n</td><td>\n\nFlag that indicates whether the check parameter is required.\n\n Valid values:\n\n-   true: The check parameter is required.\n-   false: The check parameter is optional.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the check parameter.Data type: String\n\n</td></tr></tbody>\n</table>**Note:** Refer to the data dictionary for a comprehensive list of Check Definition fields and types.\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|404|The check parameter was not found with sys\\_id provided.|\n|500|Error updating the check parameter.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|None|Success or error message.|\n\n### cURL request\n\nThe following example shows how to activate a check parameter.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check_def_params/02d89bb01b307490f271ea42b24bcb63\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\\\"active\\\":\\\"true\\\"}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n\"message\": \"Check Definition Parameter Updated Successfully\"\n```\n\n## Agent Client Collector - POST /agents/update/check\\_def\\_secure\\_params/\\{check\\_def\\_secure\\_param\\_id\\}\n\nEnables changing one or more field values of a specified check secure parameter.\n\n### URL format\n\n`/api/sn_agent/agents/update/check_def_secure_params/{check_def_secure_param_id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\\_def\\_secure\\_param\\_id\n\n</td><td>\n\nSys\\_id of the secure parameter.Data type: String\n\nTable: Check Secure Parameter Definitions \\[sn\\_agent\\_check\\_secure\\_param\\_def\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the secure parameter is active.Valid values:\n\n-   true: The secure parameter is active.\n-   false: The secure parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the secure parameter.Data type: String\n\n</td></tr><tr><td>\n\norder\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script.Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|404|The check secure parameter was not found with sys\\_id provided.|\n|500|Error updating the check secure parameter.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|None|Success or error message.|\n\n### cURL request\n\nThe following example shows how to activate a check secure parameter.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check_def_secure_params/2d30a066dba530106f4810284b9619c1\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\\\"active\\\":\\\"true\\\"}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n\"message\": \"Check Definition Secure Parameter Updated Successfully\"\n```\n\n## Agent Client Collector - POST /agents/update/check\\_defs/\\{check\\_def\\_id\\}\n\nEnables changing one or more field values of a specified check definition.\n\n### URL format\n\n`/api/sn_agent/agents/update/check_defs/{check_def_id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheck\\_def\\_id\n\n</td><td>\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nIndicates whether this check definition is active.Valid values:\n\n-   0: This check definition is inactive.\n-   1: This check definition is active.\n\n Data type: Number\n\n</td></tr><tr><td>\n\nbackground\n\n</td><td>\n\nFlag that indicates whether this check definition is a background check. A background check is a check which the agent starts execution of and doesn’t wait for it to finish running.Valid values:\n\n-   true: This check definition is a background check.\n-   false: This check definition is not a background check.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\ncheck\\_group\n\n</td><td>\n\nGroup specified for this check definition.\n\n</td></tr><tr><td>\n\ncheck\\_type\n\n</td><td>\n\nType of check.Possible values:\n\n-   Events – Check results are transformed into an Event Management event.\n-   Metrics – Values from the check result are transformed to metrics.\n\n Data type: String\n\n</td></tr><tr><td>\n\ncommand\n\n</td><td>\n\nCommand that the Agent Client Collector executes.Data type: String\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the check.Data type: String\n\n</td></tr><tr><td>\n\nparams\n\n</td><td>\n\nMap of parameter names and values. These settings can be used to override the parameter records of the check definition and its specified values. ```\n\"params\": {\n  \"<parameter name>\": \"String\"\n}\n```\n\n Data type: Object\n\n</td></tr><tr><td>\n\nplugins\n\n</td><td>\n\nList of [Agent Client Collector plugins](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-assets.md) associated with this check.Data type: Array\n\n</td></tr><tr><td>\n\nproxy\\_valid\n\n</td><td>\n\nFlag that indicates whether the check definition policy is set to work as a proxy.\n\n Valid values:\n\n-   true: This check definition policy is set to work as a proxy.\n-   false: This check definition policy is not set to work as a proxy.\n\n Data type: Boolean\n\n</td></tr><tr><td>\n\nquery\n\n</td><td>\n\nEncoded query for retrieving the GlideRecord from the table specified in the **table** property.Data type: String\n\n</td></tr><tr><td>\n\ntable\n\n</td><td>\n\nName of the cmdb\\_ci table for this check.Data type: String\n\n</td></tr><tr><td>\n\ntimeout\n\n</td><td>\n\nTimeout in seconds.Data type: Number\n\n</td></tr></tbody>\n</table>**Note:** Refer to the data dictionary for a comprehensive list of Check Definition fields and types.\n\n### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|404|The check definition was not found with sys\\_id provided.|\n|500|Error updating the check definition.|\n\n### Response body parameters \\(JSON\\)\n\n|Name|Description|\n|----|-----------|\n|None|Success or error message.|\n\n### cURL request\n\nThe following example shows how to deactivate a check definition.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check_defs/99e12466dba530106f4810284b961976\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\\\"active\\\":\\\"false\\\"}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n\"message\": \"Check Definition Updated Successfully\"\n```\n\n## Agent Client Collector - POST /agents/update/check\\_param/\\{param\\_id\\}\n\nUpdates a selected policy check parameter.\n\nTo retrieve the properties of a policy sandbox copy, use [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\n### URL format\n\n`/api/sn_agent/agents/update/check_param/{param_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nparam\\_id\n\n</td><td>\n\nSys\\_id of policy check parameter sandbox copy.Data type: String\n\nTable: Check Parameters \\[sn\\_agent\\_check\\_param\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_fvh_g2z_2pb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the check parameter is active.Valid values:\n\n-   true: Check parameter is active.\n-   false: Check parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nflag\n\n</td><td>\n\n \n\n</td></tr><tr><td>\n\nmandatory\n\n</td><td>\n\nFlag that indicates whether this check is mandatory.Valid values:\n\n-   true: This check is mandatory.\n-   false: This check is optional.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the parameter.Data type: String\n\n</td></tr><tr><td>\n\nvalue\n\n</td><td>\n\nValue of the parameter.Data type: String\n\n</td></tr><tr><td>\n\nvalue\\_required\n\n</td><td>\n\nFlag that indicates whether the information provided by the value property is required.Valid values:\n\n-   true: The value property is required.\n-   false: The value property is null or not required.\n\nData type: Boolean\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_mvh_g2z_2pb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to update several properties of a policy check parameter.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check_param/<param_sys_id>\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   \\\"flag\\\" : \\\"-d\\\",\n   \\\"mandatory\\\" : \\\"true\\\",\n   \\\"name\\\" : \\\"scheme2\\\",\n   \\\"value\\\" : \\\"120\\\",\n   \\\"value_required\\\" : \\\"false\\\"\n}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - POST /agents/update/check\\_secure\\_param/\\{param\\_id\\}\n\nUpdates a selected policy check secure parameter.\n\nTo retrieve the properties of a policy sandbox copy, use [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\n### URL format\n\n`/api/sn_agent/agents/update/check_secure_param/{param_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nparam\\_id\n\n</td><td>\n\nSys\\_id of the policy check secure parameter sandbox copy.Data type: String\n\nTable: Check Secure Parameter \\[sn\\_agent\\_check\\_secure\\_param\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_fzx_f2z_2pb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nactive\n\n</td><td>\n\nFlag that indicates whether the check secure parameter is active.Valid values:\n\n-   true: The check secure parameter is active.\n-   false: The check secure parameter is inactive.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the secure parameter.Data type: String\n\n</td></tr><tr><td>\n\norder\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script.Data type: Number\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_mzx_f2z_2pb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to update the properties of a policy check secure parameter.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/check_secure_param/<param_sys_id>\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   \\\"name\\\" : \\\"new name\\\",\n   \\\"order\\\" : \\\"2\\\"\n}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n## Agent Client Collector - POST /agents/update/policy/\\{policy\\_id\\}\n\nUpdates a sandbox copy of a policy.\n\nTo retrieve the properties of a policy sandbox copy, use [GET /agents/policy/sandbox\\_from\\_published/\\{policy\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\n### URL format\n\n`/api/sn_agent/agents/update/policy/{policy_id}`\n\n### Supported request parameters\n\n<table id=\"table_n3g_1fs_2pb\" class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npolicy\\_id\n\n</td><td>\n\nSys\\_id of a policy sandbox copy.Data type: String\n\nTable: Policies \\[sn\\_agent\\_policy\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncred\\_alias\n\n</td><td>\n\nCredential name.Data type: String\n\nTable: Credentials \\[discovery\\_credentials\\]\n\n</td></tr><tr><td>\n\ncredential\\_alias\n\n</td><td>\n\nSys\\_id of the credential alias.Data type: String\n\nTable: Connection &amp; Credential Aliases \\[sys\\_alias\\]\n\n</td></tr><tr><td>\n\nfilter\n\n</td><td>\n\nFilter restricting the policy's checks to monitor only the specified criteria. Data type: String\n\n</td></tr><tr><td>\n\ninterval\n\n</td><td>\n\nAmount of time in seconds to wait between policy checks. For example, a value of 60 means that the check runs every 60 seconds.**Note:** The value of the **checks.interval** property overrides the value configured in this field.\n\nData type: Number\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_group\n\n</td><td>\n\nName of the [CMDB groups](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/cmdb-groups.md) associated with the policy.This field is only applied if the value of the **monitored\\_ci\\_type\\_group** property is true.\n\nData type: String\n\nTable: CMDB Groups \\[cmdb\\_group\\]\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_script\n\n</td><td>\n\nScript for monitoring CIs.This field is only applied if the value of the **policies.monitored\\_ci\\_type\\_script** property is true.\n\nData type: String\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_filter\n\n</td><td>\n\nFlag that indicates whether filtering by CI type is enabled. The CI type is listed in the **table** property.Valid values:\n\n-   true: Filtering by checks group is enabled.\n-   false: Filtering by checks group is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_group\n\n</td><td>\n\nFlag that indicates whether monitoring by CMDB group type is enabled.Valid values:\n\n-   true: CMDB group type is enabled.\n-   false: CMDB group type is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nmonitored\\_ci\\_type\\_script\n\n</td><td>\n\nFlag that indicates whether the script for monitoring CIs is enabled.Valid values:\n\n-   true: Script for monitoring CIs is enabled.\n-   false: Script for monitoring CIs is disabled.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nName of the policy.Data type: String\n\n</td></tr><tr><td>\n\ntable\n\n</td><td>\n\nMonitored CI-type field on the policy. This field is only applied if **monitored\\_ci\\_type\\_filter** is true.Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|403|The user does not have the agent\\_client\\_collector\\_admin role.|\n|404|No record found with the provided sys\\_id.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nMessage containing operation success or failure results.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to update the name and filter properties/fields of a policy.\n\n```\ncurl \"https://instance.service-now.com/api/sn_agent/agents/update/policy/<policy_sys_id>\" \\--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"name\\\" : \\\"new policy name\\\",\n  \\\"filter\\\" : \\\"operational_status=1\\\"\n}\" \\\n--user 'username':'password'\n```\n\nOutput:\n\n```\n{\n  \"message\": \"Operation was successful\"\n}\n```\n\n"}}