DocumentationOpen PingAgain
Browse

Developer API

Developer API overview

Automate PingAgain through the versioned /api/v1 interface.

The Developer API automates monitor and incident workflows within the account that owns the API key. Begin with a read-only key and add write or control access only when required.

Create and revoke scoped API keys from the Developer API page.
PingAgain Developer API page with scoped API key controls

Create and revoke scoped API keys from the Developer API page.

Base URL

Append /api/v1 to the base URL for your PingAgain environment. Keep the base URL in configuration so clients do not depend on the current beta hostname.

export PINGAGAIN_BASE_URL="https://your-pingagain-host.example"
export PINGAGAIN_TOKEN="pa_example_token"

pa_example_token is intentionally fake. Replace it through your local secret configuration, never in committed source.

First request

List the first 20 monitors with a key that has monitors:read:

curl --fail-with-body \
  --header "Authorization: Bearer ${PINGAGAIN_TOKEN}" \
  "${PINGAGAIN_BASE_URL}/api/v1/monitors?limit=20"

Check the HTTP status before parsing JSON. Treat pagination cursors as opaque and avoid logging the Authorization header.

Next: create a key with the right scope, use the Monitors API, or review pagination and errors.