Now that Amazon AWS has restored services and website appear to be normalized, we are working to restore our website monitoring intervals to the standard 60 seconds. If you have any questions, please feel free to reach out to support@stat2.io.

Monitors

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
https://stat2.io/api/v1/monitors

Request example:

curl --location --request GET 'https://stat2.io/api/v1/monitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
search
optional string
The search query.
search_by
optional string
Search by. Possible values are: name for Name, url for URL. Defaults to: name.
status_page_id
optional integer
Status page ID.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name, url for URL. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint:

GET
https://stat2.io/api/v1/monitors/{id}

Request example:

curl --location --request GET 'https://stat2.io/api/v1/monitors/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://stat2.io/api/v1/monitors

Request example:

curl --location --request POST 'https://stat2.io/api/v1/monitors' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'url={url}'
Parameter
Type
Description
name
required string
Name.
url
required string
URL.
interval
required integer
Interval. Possible values are: 60, 180, 300, 600, 900, 1800, 3600.
alert_condition
required string
Alert condition. Possible values are: url_unavailable for URL becomes unavailable, url_text for URL response contains text, url_no_text for URL response does not contain text.
alert_text_lookup
optional string
Text to be looked-up to trigger alerts. Only works with alert_condition field set to url_text, url_no_text.
request_method
required string
Request method. Possible values are: GET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS.
request_headers[index][key]
optional string
Request header name.
request_headers[index][value]
optional string
Request header value.
request_auth_username
optional string
Username for Basic HTTP request authentication.
request_auth_password
optional string
Password for Basic HTTP request authentication.
cache_buster
optional integer
Cache buster. Possible values are: 0 for Disabled, 1 for Enabled. Defaults to: 0.
ssl_alert_days
optional integer
The number of days before SSL certificate expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
domain_alert_days
optional integer
The number of days before domain name expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
optional string
Maintenance starting date in Y-m-d H:i format.
maintenance_end_at
optional string
Maintenance ending date in Y-m-d H:i format.
alerts[index][key]
optional string
Alert channels. Possible values are: email for Email, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, flock for Flock, telegram for Telegram, sms for SMS.
alerts[index][value]
optional string
Value of the alert.
Update

API endpoint:

PUT PATCH
https://stat2.io/api/v1/monitors/{id}

Request example:

curl --location --request PUT 'https://stat2.io/api/v1/monitors/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
Parameter
Type
Description
name
optional string
Name.
url
optional string
URL.
interval
optional integer
Interval. Possible values are: 60, 180, 300, 600, 900, 1800, 3600.
alert_condition
optional string
Alert condition. Possible values are: url_unavailable for URL becomes unavailable, url_text for URL response contains text, url_no_text for URL response does not contain text.
alert_text_lookup
optional string
Text to be looked-up to trigger alerts. Only works with alert_condition field set to url_text, url_no_text.
request_method
optional string
Request method. Possible values are: GET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS.
request_headers[index][key]
optional string
Request header name.
request_headers[index][value]
optional string
Request header value.
request_auth_username
optional string
Username for Basic HTTP request authentication.
request_auth_password
optional string
Password for Basic HTTP request authentication.
cache_buster
optional integer
Cache buster. Possible values are: 0 for Disabled, 1 for Enabled.
ssl_alert_days
optional integer
The number of days before SSL certificate expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
domain_alert_days
optional integer
The number of days before domain name expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
optional string
Maintenance starting date in Y-m-d H:i format.
maintenance_end_at
optional string
Maintenance ending date in Y-m-d H:i format.
alerts[index][key]
optional string
Alert channels. Possible values are: email for Email, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, flock for Flock, telegram for Telegram, sms for SMS.
alerts[index][value]
optional string
Value of the alert.
paused
optional boolean
Paused.
Delete

API endpoint:

DELETE
https://stat2.io/api/v1/monitors/{id}

Request example:

curl --location --request DELETE 'https://stat2.io/api/v1/monitors/{id}' \
--header 'Authorization: Bearer {api_key}'