List all checks
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Optional parameters
- Name
page
- Type
- string
- Description
Page number of paginated results.
Default:
"1"
- Name
per_page
- Type
- string
- Description
Number of items per page.
Default:
"20"
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | Returns a list of OnlineOrNot Checks |
500 | Internal Server Error | Internal Server Error |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | [object] | true | none |
»» id | string | true | Uptime Check ID |
»» name | string | true | Name of the check |
»» url | string(uri) | true | URL to check |
»» status | string,null | true | Status of the check |
»» last_queued | string | true | Last time the check was queued |
» result_info | object | true | none |
»» page | number | false | Page number of paginated results. |
»» per_page | number | false | Number of items per page. |
»» count | number | true | Number of items on the current page. |
»» total_count | number | true | Total number of items. |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
Enumerated Values
Property | Value |
---|---|
status | ONLINE |
status | OFFLINE |
Request
curl --request GET \
--url https://api.onlineornot.com/v1/checks \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": [
{
"id": "a1b2c3d4",
"name": "My landing page",
"url": "https://example.com",
"status": "ONLINE",
"last_queued": "2021-01-01T00:00:00.000Z"
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
Create a check
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Required parameters
- Name
» name
- Type
- string
- Description
Name of the check
- Name
» url
- Type
- string(uri)
- Description
URL to check
Optional parameters
- Name
body
- Type
- object
- Description
undefined
- Name
» text_to_search_for
- Type
- string
- Description
Text to search for in the response
- Name
» test_interval
- Type
- integer
- Description
Interval in seconds between checks
- Name
» number_of_fails_before_alert
- Type
- integer
- Description
Number of failing checks before an alert is sent
Default:
2
- Name
» type
- Type
- string - enum
- Description
Type of check
Default:
"UPTIME_CHECK"
Enum:"UPTIME_CHECK"
"BROWSER_CHECK"
- Name
» alert_priority
- Type
- string - enum
- Description
Alert Priority
Default:
"LOW"
Enum:"LOW"
"HIGH"
- Name
» headers
- Type
- object
- Description
Headers to send with the request
- Name
»» **additionalProperties**
- Type
- string
- Description
Header value
- Name
» method
- Type
- string - enum
- Description
HTTP Method
Default:
"GET"
Enum:"GET"
"HEAD"
"POST"
"PUT"
"PATCH"
"DELETE"
- Name
» body
- Type
- string
- Description
undefined
- Name
» follow_redirects
- Type
- boolean
- Description
Whether to follow redirects
Default:
true
- Name
» assertions
- Type
- object
- Description
undefined
- Name
»» **additionalProperties**
- Type
- string
- Description
undefined
- Name
» verify_ssl
- Type
- boolean
- Description
Whether to fail a check if SSL verification fails
- Name
» auth_username
- Type
- string
- Description
Username to use for URLs behind HTTP Basic Auth
- Name
» auth_password
- Type
- string
- Description
Password to use for URLs behind HTTP Basic Auth
Body parameter
{
"name": "My landing page",
"url": "https://example.com",
"text_to_search_for": "Example Domain",
"test_interval": 60,
"number_of_fails_before_alert": 2,
"type": "UPTIME_CHECK",
"alert_priority": "LOW",
"headers": {
"X-My-Header": "My Value"
},
"method": "GET",
"body": "Hello World",
"follow_redirects": true,
"assertions": {
"property1": "string",
"property2": "string"
},
"verify_ssl": false,
"auth_username": "username",
"auth_password": "password"
}
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | Create a new OnlineOrNot Check |
500 | Internal Server Error | Internal Server Error |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | object | true | none |
»» id | string | true | Uptime Check ID |
»» name | string | true | Name of the check |
»» url | string(uri) | true | URL to check |
»» status | string,null | true | Status of the check |
»» last_queued | string | true | Last time the check was queued |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
Enumerated Values
Property | Value |
---|---|
status | ONLINE |
status | OFFLINE |
Request
curl --request POST \
--url https://api.onlineornot.com/v1/checks \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"name":"My landing page","url":"https://example.com","text_to_search_for":"Example Domain","test_interval":60,"number_of_fails_before_alert":2,"type":"UPTIME_CHECK","alert_priority":"LOW","headers":{"X-My-Header":"My Value"},"method":"GET","body":"Hello World","follow_redirects":true,"assertions":{"property1":"string","property2":"string"},"verify_ssl":false,"auth_username":"username","auth_password":"password"}'
Response
{
"result": {
"id": "a1b2c3d4",
"name": "My landing page",
"url": "https://example.com",
"status": "ONLINE",
"last_queued": "2021-01-01T00:00:00.000Z"
},
"success": true,
"errors": [],
"messages": []
}
Retrieve a check
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Required parameters
- Name
check_id
- Type
- string
- Description
Uptime Check ID
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | Retrieve the specified OnlineOrNot Check |
500 | Internal Server Error | Internal Server Error |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | object | true | none |
»» id | string | true | Uptime Check ID |
»» name | string | true | Name of the check |
»» url | string(uri) | true | URL to check |
»» status | string,null | true | Status of the check |
»» last_queued | string | true | Last time the check was queued |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
Enumerated Values
Property | Value |
---|---|
status | ONLINE |
status | OFFLINE |
Request
curl --request GET \
--url https://api.onlineornot.com/v1/checks/a1b2c3d4 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "a1b2c3d4",
"name": "My landing page",
"url": "https://example.com",
"status": "ONLINE",
"last_queued": "2021-01-01T00:00:00.000Z"
},
"success": true,
"errors": [],
"messages": []
}
Delete a check
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Required parameters
- Name
check_id
- Type
- string
- Description
Uptime Check ID
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | Returns the deleted OnlineOrNot Check's ID |
500 | Internal Server Error | Internal Server Error |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | object | true | none |
»» id | string | true | Uptime Check ID |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
Request
curl --request DELETE \
--url https://api.onlineornot.com/v1/checks/a1b2c3d4 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "a1b2c3d4"
},
"success": true,
"errors": [],
"messages": []
}