Clear a Check

Service name: clear_check

Base URL

https://{SERVER}/api/?apikey={yourAPIkey}&service=clear_check

Description

Clear a check status. After a check has failed, mark it as 'cleared', thereby acknowledging the cause of the failure.The check will be shown using an amber tick. A note describes the reason for the failure and the action taken by the engineer.

  • This API call is only supported where Check Clearing is enabled on the account for this check frequency type, i.e. 24x7 and/or Daily Safety Check.
  • Only Checks that are currently in the failing state (red exclamation box on the All Devices view) can be cleared.
  • Where the option to Prompt for notes when clearing failed checks is enabled in the N-sight UI at Settings > General Settings> Notes, both the public note (customer facing) and the private note (for engineers) must be non-empty.
    • For example: https://{SERVER}/api/?apikey={yourAPIkey}&service=clear_check&checkid=X&public_note=Public%20Note&private_note=Private%20Note
  • All check clearing actions add an entry in the User Audit Report.

Parameters

Required parameters

Add required parameters immediately after the base URL.

https://{SERVER}/api/?apikey={yourAPIkey}&service=clear_check&required_parameters={parameter-value}
ParameterTypeDescriptionOptionsDefault
describeBooleanOptional. Returns a description of the service.00
checkidNumberThe ID of the Check you want to clear.00
private_noteStringTechnical (private) note00
public_noteStringClient-facing note00
clear_typeStringOptional. Action taken on clearing check untilpasses, untilnextrun, or untildatetime*. Reverts to default if not provided.untilpasses untilnextrun untildatetime0
clear_untilDatetimeOptional. *If untildatetime is selected as the clear_type then this date/time value is required to determine how long a check will be cleared until. Format is ISO-8601, e.g. 2024-10-21 11:22:3300

Optional parameters

Add optional parameters immediately after the base URL.

https://{SERVER}/api/?apikey={yourAPIkey}&service=clear_check&optional_parameters={parameter-value}
ParameterDescriptionTypeRequiredOptionsDefault
describeReturns a description of the service.booleannotrue0

Determine parameter values

Use the following associated service calls to determine parameter values.

ParameterCallURL Format
checkidlist_checkshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_checks&deviceid=DEVICEID
deviceidlist_devices_at_clienthttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_devices_at_client&clientid=CLIENTID&devicetype=server
list_servershttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_servers&siteid=SITEID
list_workstationshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_workstations&siteid=SITEID
siteidlist_siteshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&clientid=CLIENTID
clientidlist_clientshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_clients

Examples

Clear a check

https://{SERVER}/api/?apikey={yourAPIkey}&service=clear_check&checkid=CHECKID&clear_type=untildatetime&clear_until=CLEAR_UNTIL

Example response

<?xml version="1.0"?>
<result created="2024-03-25T16:20:24+00:00" host="SERVER" status="OK">
  <message><![CDATA[check cleared]]></message>
</result>

Returned fields

FieldTypeCan Be EmptyDescription
messagestringnoMessage relating to clear check state