GET/v1/checks

List all checks

Retrieve a paginated list of all uptime 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

StatusMeaningDescription
200OKReturns a list of OnlineOrNot Checks
500Internal Server ErrorInternal Server Error

Response Schema

Status Code 200

NameTypeRequiredDescription
» result[object]truenone
»» idstringtrueUptime Check ID
»» namestringtrueName of the check
»» urlstring(uri)trueURL to check
»» statusstring,nulltrueStatus of the check
»» last_queuedstringtrueLast time the check was queued
»» headersobjectfalseHeaders to send with the request
»»» additionalPropertiesstringfalseHeader value
» result_infoobjecttruenone
»» pagenumberfalsePage number of paginated results.
»» per_pagenumberfalseNumber of items per page.
»» countnumbertrueNumber of items on the current page.
»» total_countnumbertrueTotal number of items.
» successbooleantrueWhether the API call was successful
» errors[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone
» messages[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone

Enumerated Values

PropertyValue
statusONLINE
statusOFFLINE

Request

GET
/v1/checks
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",
      "headers": {
        "X-My-Header": "My Value"
      }
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1
  },
  "success": true,
  "errors": [],
  "messages": []
}

POST/v1/checks

Create a check

Create a new uptime check to monitor a URL

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 Website Check",
  "url": "https://example.com",
  "test_interval": 60
}

Responses

StatusMeaningDescription
200OKCreate a new OnlineOrNot Check
500Internal Server ErrorInternal Server Error

Response Schema

Status Code 200

NameTypeRequiredDescription
» resultobjecttruenone
»» idstringtrueUptime Check ID
»» namestringtrueName of the check
»» urlstring(uri)trueURL to check
»» statusstring,nulltrueStatus of the check
»» last_queuedstringtrueLast time the check was queued
»» headersobjectfalseHeaders to send with the request
»»» additionalPropertiesstringfalseHeader value
» successbooleantrueWhether the API call was successful
» errors[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone
» messages[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone

Enumerated Values

PropertyValue
statusONLINE
statusOFFLINE

Request

POST
/v1/checks
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 Website Check","url":"https://example.com","test_interval":60}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "name": "My landing page",
    "url": "https://example.com",
    "status": "ONLINE",
    "last_queued": "2021-01-01T00:00:00.000Z",
    "headers": {
      "X-My-Header": "My Value"
    }
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/checks/{check_id}

Retrieve a check

Look up detailed information about a specific uptime 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

StatusMeaningDescription
200OKRetrieve the specified OnlineOrNot Check
500Internal Server ErrorInternal Server Error

Response Schema

Status Code 200

NameTypeRequiredDescription
» resultobjecttruenone
»» idstringtrueUptime Check ID
»» namestringtrueName of the check
»» urlstring(uri)trueURL to check
»» statusstring,nulltrueStatus of the check
»» last_queuedstringtrueLast time the check was queued
»» headersobjectfalseHeaders to send with the request
»»» additionalPropertiesstringfalseHeader value
» successbooleantrueWhether the API call was successful
» errors[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone
» messages[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone

Enumerated Values

PropertyValue
statusONLINE
statusOFFLINE

Request

GET
/v1/checks/{check_id}
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",
    "headers": {
      "X-My-Header": "My Value"
    }
  },
  "success": true,
  "errors": [],
  "messages": []
}

DELETE/v1/checks/{check_id}

Delete a check

Permanently delete an uptime 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

StatusMeaningDescription
200OKReturns the deleted OnlineOrNot Check's ID
500Internal Server ErrorInternal Server Error

Response Schema

Status Code 200

NameTypeRequiredDescription
» resultobjecttruenone
»» idstringtrueUptime Check ID
» successbooleantrueWhether the API call was successful
» errors[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone
» messages[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone

Request

DELETE
/v1/checks/{check_id}
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": []
}

PATCH/v1/checks/{check_id}

Modify a check

Modify the configuration of an existing uptime 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

Optional parameters

  • Name
    body
    Type
    object
    Description

    undefined

  • Name
    » headers
    Type
    object
    Description

    Headers to send with the request

  • Name
    »» **additionalProperties**
    Type
    string,null
    Description

    Header value. Set to null to remove the header.

Body parameter

{
  "headers": {
    "X-Custom-Header": "new-value",
    "My-Unused-Header": null
  }
}

Responses

StatusMeaningDescription
200OKModify an OnlineOrNot Check
500Internal Server ErrorInternal Server Error

Response Schema

Status Code 200

NameTypeRequiredDescription
» resultobjecttruenone
»» idstringtrueUptime Check ID
»» namestringtrueName of the check
»» urlstring(uri)trueURL to check
»» statusstring,nulltrueStatus of the check
»» last_queuedstringtrueLast time the check was queued
»» headersobjectfalseHeaders to send with the request
»»» additionalPropertiesstringfalseHeader value
» successbooleantrueWhether the API call was successful
» errors[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone
» messages[object]truenone
»» codenumbertruenone
»» messagestringtruenone
»» typestringfalsenone

Enumerated Values

PropertyValue
statusONLINE
statusOFFLINE

Request

PATCH
/v1/checks/{check_id}
curl --request PATCH \
  --url https://api.onlineornot.com/v1/checks/a1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"headers":{"X-Custom-Header":"new-value","My-Unused-Header":null}}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "name": "My landing page",
    "url": "https://example.com",
    "status": "ONLINE",
    "last_queued": "2021-01-01T00:00:00.000Z",
    "headers": {
      "X-My-Header": "My Value"
    }
  },
  "success": true,
  "errors": [],
  "messages": []
}

Was this page helpful?