OnlineOrNot API and Monitoring Documentation

website·Indexed 34 days ago

https://onlineornot.com/docs/

Monitor websites, APIs, browser flows, and scheduled jobs. Features include a Public Site API (v1.0.0) with OpenAPI 3.1.0 specification, status page publishing, and alert configurations for Slack, Microsoft Teams, and Telegram.

Tokens
21.4K
Snippets
138
Records
168
Agent score
69%

What's inside OnlineOrNot

  1. Retrieve an HTTP uptime check

    Look up detailed information about a specific uptime check using its ID. This operation requires the UPTIME_CHECKS:READ permission.
    curl -X GET "https://api.onlineornot.com/v1/checks/uptime/{check_id}" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
  2. Retrieve an API token

    Retrieve detailed information about a specific API token using its ID. This operation requires the API_TOKENS:READ permission (or EDIT).

    Request Details:

    • Method: GET
    • Path: /v1/tokens/{token_id}
    • Path Parameter: token_id (string, e.g., a1b2c3d4)
    • Optional Header: X-OnlineOrNot-Organisation (Public organization ID, required for grants authorizing multiple organizations).

    Response Fields:

    • id: Token ID
    • name: Token name
    • expiresAfter: Expiration date (ISO 8601) or null if it never expires
    • createdAt: Creation date
    • grants: List of assigned scopes (e.g., UPTIME_CHECKS, API_TOKENS) and permissions (READ or EDIT).
  3. Get a status page overview

    Retrieve a public summary of a status page using its subdomain. This endpoint is public and does not require security credentials. It returns the overall system status (e.g., 'All Systems Operational'), status page identity, components, active incidents, and scheduled maintenance.
    # GET /v1/status_pages/{status_page_subdomain}/summary
    curl "https://api.onlineornot.com/v1/status_pages/hackernews/summary"
  4. Retrieve webhook details

    Retrieve detailed information about a specific webhook using its unique ID. This endpoint requires the WEBHOOKS:READ permission. If using an OAuth grant that authorizes multiple organizations, provide the X-OnlineOrNot-Organisation header.
    curl -H "Authorization: Bearer YOUR_TOKEN" "https://api.onlineornot.com/v1/webhooks/a1b2c3d4"
  5. OnlineOrNot API Base URL and Capabilities

    The OnlineOrNot Client API is hosted at https://api.onlineornot.com. The API provides programmatic access to the following functional areas:

    • Checks: Manage uptime checks, results, and status history.
    • Heartbeats: Monitor cron jobs and scheduled tasks.
    • Status Pages: Manage public status pages, components, groups, incidents, and subscribers.
    • Maintenance Windows: Configure windows to suppress alerts during planned downtime.
    • Webhooks: Configure alert notification integrations.
    • Organization Management: Manage people/users and view audit logs.
    • Tokens: Manage API tokens.
  6. Retrieve a browser check

    Look up detailed information about a specific browser check using a GET request. This operation requires the UPTIME_CHECKS:READ permission.
    curl -X GET "https://api.onlineornot.com/v1/checks/browser/{check_id}" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
  7. Retrieve details for a specific uptime check

    Look up detailed information about a specific uptime check using its unique ID. This operation requires the UPTIME_CHECKS:READ permission (or UPTIME_CHECKS:EDIT). If using an OAuth grant for multiple organizations, include the X-OnlineOrNot-Organisation header.
    # GET /v1/checks/{check_id}
    curl https://api.onlineornot.com/v1/checks/a1b2c3d4 
      -H "Authorization: Bearer YOUR_TOKEN"
  8. Retrieve a heartbeat monitor

    Retrieve detailed information about a specific heartbeat monitor using its ID. This endpoint requires the HEARTBEAT_CHECKS:READ permission. If using an OAuth grant that authorizes multiple organizations, the X-OnlineOrNot-Organisation header must be provided to specify the organization ID.
    curl -X GET "https://api.onlineornot.com/v1/heartbeats/{heartbeat_id}"
      -H "Authorization: Bearer YOUR_API_TOKEN"
      -H "X-OnlineOrNot-Organisation: YOUR_ORG_ID"
  9. Retrieve a TCP check

    Look up detailed information about a specific TCP check using its ID. This operation requires the UPTIME_CHECKS:READ permission. Note that a successful HTTP 200 response may still contain a failure envelope where success is false.
    curl -X GET "https://api.onlineornot.com/v1/checks/tcp/{check_id}" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
  10. Retrieve a DNS check

    Look up detailed information about a specific DNS check. This operation requires the UPTIME_CHECKS:READ permission (or EDIT).

    Request Details:

    • Method: GET
    • Path: /v1/checks/dns/{check_id}
    • Path Parameter: check_id (string, minimum length 8, e.g., a1b2c3d4)
    • Optional Header: X-OnlineOrNot-Organisation (Public organization ID).
  11. Delete an environment variable

    Delete an environment variable using the DELETE /v1/environment_variables/{environment_variable_id} endpoint. Deletion is blocked if the variable is referenced by a saved check (including paused checks).

    Requirements:

    • Permission: ENVIRONMENT_VARIABLES:EDIT (which also grants READ).
    • Authentication: API token. Session cookies are only accepted if no bearer credential is provided.
    • Header: X-OnlineOrNot-Organisation is required for grants authorizing multiple organizations; omit for single-organization grants or API tokens.
    curl -X DELETE "https://api.onlineornot.com/v1/environment_variables/a1b2c3d4e5f6g7h8" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
  12. Install and authenticate the OnlineOrNot CLI

    The OnlineOrNot CLI can be run via npm using npx. Authentication is handled by running the onlineornot login command or by setting the ONLINEORNOT_API_TOKEN environment variable.
    # Run via npx
    npx onlineornot <command>
    
    # Authenticate via CLI
    onlineornot login
    
    # Or use environment variable
    export ONLINEORNOT_API_TOKEN=your_token_here