The CheckCentral API provides an endpoint for creating checks programmatically. All of the configuration options are available through the API, detailed below. To create a new check through the API, you will require an API token for your organization with Read/Write access. Organization administrators can create tokens through the API portal on your dashboard.
The endpoint is located at https://api.checkcentral.cc/createCheck/?apiToken=APITOKEN
where the APITOKEN placeholder is replaced with your valid token. The request must be made with the Content-Type
header set to application/json
. The body of the request should contain as many of the properties listed below as required to define the check. Any properties not passed will be set to their default value.
For example, to create a new check that:
you would send the following json in the body of the request:
{ "name": "An API Check", "email_alias": "apicheck", "interval_type": "hour", "interval_value": 2, "active_days": [ "mon", "tue", "wed", "thu", "fri" ], "success_conditions": { "required_conditions": "any", "conditions": [ { "message_field": "subject", "matches": "exactly", "value": "Message Success" }, { "message_field": "body", "matches": "contains", "value": "No Errors Reported" } ] } }
The check data must include a name
property, as well as at least one of email_alias
and matching_conditions
to allow the check to be matched against incoming messages.
The complete list of possible properties for check configuration are as follows:
Parameter | Type/Allowed Values | Default |
---|---|---|
The name for the new check. The |
String | |
The plus alias for the check. This will be used to generate the custom email address for the Check along with your organization account name: account_name+email_alias@mycheckcentral.cc. At least one of the |
String | |
The rules that will be used to match incoming messages. See the definition of a ConditionGroup below. At least one of the | ConditionGroup | {} |
The ID of the group to assign this check. IDs may be retrieved from the |
String | |
A text description for the check. |
String | |
The interval unit CheckCentral will use to calculate the expected arrival time of incoming messages |
One of:
|
day |
The number of interval units (see above) used when calculating the expected arrival of incoming messages. |
Integer | 1 |
How many minutes after the interval has elapsed CheckCentral will wait before flagging the check as failed. |
Integer | 30 |
An optional time of day when messages will begin to be received. |
String | 00:00 |
An optional time of day when messages will cease to be received. |
String | 00:00 |
Pass an array of days to indicate which days the check should expect to receive messages. |
An array containing either
|
[ "all" ] |
Pass an array of personal notification services to configure the check to send alerts via those services. |
An array containing any of:
|
[] |
Pass an array of organization notification channel IDs to configure the check to send alerts via those services. IDs may be retrieved from the |
Array[String] |
[] |
Pass an array of organization external ticketing system IDs to configure the check to create and update tickets via those services. IDs may be retrieved from the |
Array[String] |
[] |
Checks with this flag will send an alert when they are restored to a success state by an incoming message. |
Bool | true |
Checks with this flag set to false will only send alerts during the time window and active days configured above. |
Bool | true |
This parameter controls when CheckCentral will send alerts about repeated failure or warning messages. |
One of:
|
always |
If notify_consecutive_alerts is set to either after_n or every_nth, this parameter configures how many consecutive failures or consecutive warnings will trigger alerts. |
Integer | 1 |
The number of minutes this check will wait to send alerts about failures. If the check is returned to successful status before this period elapses, any pending alerts will be cancelled. |
Integer | 0 |
The default status for incoming messages that don't match against any of the conditions below. |
One of:
|
failure |
The rules that determine whether incoming messages will be set to success. See the definition of a ConditionGroup below. |
ConditionGroup | {} |
The rules that determine whether incoming messages will be set to warning. See the definition of a ConditionGroup below. |
ConditionGroup | {} |
The rules that determine whether incoming messages will be set to failure. See the definition of a ConditionGroup below. |
ConditionGroup | {} |
Parameter | Type/Allowed Values | Default |
---|---|---|
This parameter controls whether incoming messages must meet any or all of the conditions defined below to be considered a match. |
One of:
|
"all" |
If this flag is set, all of the conditions defined in this group will treat multiple whitespace characters as a single space. |
Bool | false |
The list of conditions for this ConditionGroup to match messages against. See the definition of a Condition below. |
Array[Condition] | [] |
Parameter | Type/Allowed Values | Default |
---|---|---|
Which part of the incoming message will be examined for this condition. |
One of:
|
subject |
What matching rule this condition will use. |
One of:
|
contains |
The value to use with the above matching rule and message component. |
String |