{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":705,"path":"api-reference/server-api-reference/AccCheckDefsAPIAPIScoped.md","title":"AccCheckDefsAPI - Scoped","bundle":null,"doc_type":null,"release":"australia","body":"\n# AccCheckDefsAPI- Scoped\n\nThe AccCheckDefsAPI script include enables managing check definitions and associated parameters.\n\nThis script include requires the Agent Client Collector Framework \\(sn\\_agent\\) store application and is provided within the `sn_agent` namespace. This script include requires the agent\\_client\\_collector\\_admin role. For more information, refer to [Agent Client Collector](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/acc-landing-page.md).\n\nThis script include does not have a constructor for creating an instance. Call each method using the AccCheckDefsAPI static class in the following format:\n\n`sn_agent.AccCheckDefsAPI.<method>`\n\nFor the REST API solution, refer to [Agent Client Collector API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/agnt_clnt_cll-api.md).\n\nThis script include provides methods that enable the following:\n\n-   Get a specified check definition\n-   Get a list of check definitions\n-   Update checks and check parameters\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## AccCheckDefsAPI - getCheck\\(String checkDefId, Boolean withParams\\)\n\nGets a specified check definition with details.\n\n<table id=\"table_zk2_2g2_z4b\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheckDefId\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table.\n\n</td></tr><tr><td>\n\nwithParams\n\n</td><td>\n\nBoolean\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 Default: False\n\n</td></tr></tbody>\n</table><table id=\"table_al2_2g2_z4b\" class=\"returns\"><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\"check \": {\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\ncheck.background\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.check\\_group\n\n</td><td>\n\nGroup specified for this check definition. Data type: String\n\n</td></tr><tr><td>\n\ncheck.check\\_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\ncheck.command\n\n</td><td>\n\nCommand that the Agent Client Collector executes. Data type: String\n\n</td></tr><tr><td>\n\ncheck.error\n\n</td><td>\n\nMessage if there is an error. Null otherwise.Data type: String\n\n</td></tr><tr><td>\n\ncheck.name\n\n</td><td>\n\nName of the check. Data type: String\n\n</td></tr><tr><td>\n\ncheck.params\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\ncheck.params.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\ncheck.params.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\ncheck.params.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\ncheck.params.name\n\n</td><td>\n\nName of the check parameter. Data type: String\n\n</td></tr><tr><td>\n\ncheck.params.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\ncheck.plugins\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\ncheck.proxy\\_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\ncheck.secure\\_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\ncheck.secure\\_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\ncheck.secure\\_params.name\n\n</td><td>\n\nName of the secure parameter. Data type: String\n\n</td></tr><tr><td>\n\ncheck.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\ncheck.secure\\_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\ncheck.sys\\_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\ncheck.timeout\n\n</td><td>\n\nTimeout in seconds. Data type: Number\n\n</td></tr></tbody>\n</table>The following example shows how to get information for a specified check definition.\n\n```\nvar checkDefId = \"94436b237f705300f128134f8dfa91a4\";\nvar withParams = true;\n\nvar checkDef = sn_agent.AccCheckDefsAPI.getCheck(checkDefId, withParams);\n\ngs.info(JSON.stringify(checkDef, null, 2));\n```\n\nOutput:\n\n```\n{\n  \"check\": {\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  \"error\": null\n}\n```\n\n## AccCheckDefsAPI - getChecksList\\(String encodedQuery, Number limit, Boolean withParams\\)\n\nGets a list of check definitions with details.\n\nSee also [Checks and policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/checks-policies.md).\n\n<table id=\"table_zk2_2g2_z4b\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nencodedQuery\n\n</td><td>\n\nString\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.\n\n</td></tr><tr><td>\n\nlimit\n\n</td><td>\n\nNumber\n\n</td><td>\n\nLimits the number of returned records. Set to null to use the default value. Default: 20,000\n\n</td></tr><tr><td>\n\nwithParams\n\n</td><td>\n\nBoolean\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 Default: False\n\n</td></tr></tbody>\n</table><table id=\"table_al2_2g2_z4b\" class=\"returns\"><thead><tr><th>\n\nProperties\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>The following example shows how to retrieve a list of two check definitions with parameter values.\n\n```\nvar encQuery = \"nameSTARTSWITHchecks_\";\nvar limit = 2;\nvar withParams = true;\n\nvar checkDefs = sn_agent.AccCheckDefsAPI.getChecksList(encQuery, limit, withParams);\n\ngs.info(JSON.stringify(checkDefs, null, 2));\n```\n\nOutput:\n\n```\n[\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## AccCheckDefsAPI - updateCheck\\(String checkDefId, Object updateJson\\)\n\nEnables changing one or more field values of a specified check definition.\n\nSee also [Checks and policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-operations-management/checks-policies.md).\n\n<table id=\"table_zk2_2g2_z4b\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheckDefId\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the check definition listed in the Check Definitions \\[sn\\_agent\\_check\\_def\\] table.\n\n</td></tr><tr><td>\n\nupdateJson\n\n</td><td>\n\nObject\n\n</td><td>\n\nMap of check definition fields to be updated to their new values. Refer to the data dictionary for a comprehensive list of Check Definition fields and types.```\n{\n \"background\": Boolean,\n \"check_group\": \"String\",\n \"check_type\": \"String\",\n \"command\": \"String\",\n \"name\": \"String\",\n \"plugins\": [Array],\n \"proxy_valid\": Boolean,\n \"timeout\": Number\n}\n```\n\n</td></tr><tr><td>\n\nupdateJson.active\n\n</td><td>\n\nNumber\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</td></tr><tr><td>\n\nupdateJson.background\n\n</td><td>\n\nBoolean\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</td></tr><tr><td>\n\nupdateJson.check\\_group\n\n</td><td>\n\nString\n\n</td><td>\n\nGroup specified for this check definition.\n\n</td></tr><tr><td>\n\nupdateJson.check\\_type\n\n</td><td>\n\nString\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</td></tr><tr><td>\n\nupdateJson.command\n\n</td><td>\n\nString\n\n</td><td>\n\nCommand that the Agent Client Collector executes.\n\n</td></tr><tr><td>\n\nupdateJson.name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the check.\n\n</td></tr><tr><td>\n\nupdateJson.plugins\n\n</td><td>\n\nArray\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.\n\n</td></tr><tr><td>\n\nupdateJson.proxy\\_valid\n\n</td><td>\n\nBoolean\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</td></tr><tr><td>\n\nupdateJson.timeout\n\n</td><td>\n\nNumber\n\n</td><td>\n\nTimeout in seconds.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None|Error message if unsuccessful.|\n\nThe following example shows how to deactivate a check definition.\n\n```\nvar checkJson = sn_agent.AccCheckDefsAPI.getCheck(activeCheckDefs[0].sys_id, true);\nif (!gs.nil(checkJson.error))\n\tgs.error(checkJson.error);\n\nvar updateJson = {active: \"0\"}; // deactivate the check definition\nsn_agent.AccCheckDefsAPI.updateCheck(checkJson.check.sys_id, updateJson);\n```\n\n## AccCheckDefsAPI - updateCheckParam\\(String checkDefParamId, Object updateJson\\)\n\nEnables changing one or more field values of a specified check parameter.\n\n<table id=\"table_zk2_2g2_z4b\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheckDefParamId\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the check parameter listed in the Check Parameter Definitions \\[sn\\_agent\\_check\\_param\\_def\\] table.\n\n</td></tr><tr><td>\n\nupdateJson\n\n</td><td>\n\nObject\n\n</td><td>\n\nMap of check parameter fields to be updated to their new values. Refer to the data dictionary for a comprehensive list of Check Secure Parameter Definition fields and types.```\n{\n \"active\": Boolean,\n \"default_value\": \"String\",\n \"mandatory\": Boolean,\n \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nupdateJson.active\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the check parameter is active.\n\n Valid values:\n\n-   true: The check parameter is active.\n-   false: The check parameter is inactive.\n\n</td></tr><tr><td>\n\nupdateJson.default\\_value\n\n</td><td>\n\nString\n\n</td><td>\n\nSpecifies the default value for this check parameter.\n\n</td></tr><tr><td>\n\nupdateJson.mandatory\n\n</td><td>\n\nBoolean\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</td></tr><tr><td>\n\nupdateJson.name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the check parameter.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None|Error message if unsuccessful.|\n\nThe following example shows how to activate a check parameter.\n\n```\nvar checkParmSysId = \"cd922ce6dba530106f4810284b961966\";\nvar updateJson = {\"active\": \"true\"};\nsn_agent.AccCheckDefsAPI.updateCheckSecureParam(checkParmSysId, updateJson);\n```\n\n## AccCheckDefsAPI - updateCheckSecureParam\\(String checkDefSecureParamId, Object updateJson\\)\n\nEnables changing one or more field values of a specified check secure parameter.\n\n<table id=\"table_zk2_2g2_z4b\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncheckDefSecureParamId\n\n</td><td>\n\nString\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.\n\n</td></tr><tr><td>\n\nupdateJson\n\n</td><td>\n\nObject\n\n</td><td>\n\nMap of check secure parameter fields to be updated to their new values. Refer to the data dictionary for a comprehensive list of Check Secure Parameter Definition fields and types.```\n{\n \"active\": Boolean,\n \"name\": \"String\",\n \"order\": Number\n}\n```\n\n</td></tr><tr><td>\n\nupdateJson.active\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the secure parameter is active.\n\n Valid values:\n\n-   true: The secure parameter is active.\n-   false: The secure parameter is inactive.\n\n</td></tr><tr><td>\n\nupdateJson.name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the secure parameter.\n\n</td></tr><tr><td>\n\nupdateJson.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOrder in which the parameter is sent to the check command/script.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None|Error message if unsuccessful.|\n\nThe following example shows how to activate a check secure parameter.\n\n```\nvar checkSecParmSysId = \"<sys_id>\";\nvar updateJson = {\"active\": \"true\"};\nsn_agent.AccCheckDefsAPI.updateCheckSecureParam(checkSecParmSysId, updateJson);\n```\n\n"}}