Chronosphere API

Get started with the Chronosphere API

The Chronosphere API is an HTTP/JSON REST API where HTTP method and URL path define endpoints. To access the Chronosphere API, you need an API token.

Create an API token

A service can access the Chronosphere API by authenticating with its API token. Many Chronosphere API requests require an unrestricted service account. For details, see Service Accounts.

A user with sufficient permissions can access the Chronosphere API by creating a temporary personal access token. For details, see Personal Access Token.

Send requests

Send requests to your Chronosphere domain, which must include your Chronosphere API token in an API-Token HTTP header.

For example, you can pass the token and domain using environment variables to the curl command:

export CHRONOSPHERE_API_TOKEN="<TOKEN>"
export CHRONOSPHERE_DOMAIN="<INSTANCE>.chronosphere.io"
curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
     -X <http-method> \
     "https://${CHRONOSPHERE_DOMAIN}/<ENDPOINT_PATH>"

Replace <TOKEN> with your API token, <INSTANCE> with the subdomain name for your organization's Chronosphere instance, and <ENDPOINT_PATH> with the specific endpoint you want to access.

Chronoctl also uses the environment variable CHRONOSPHERE_API_TOKEN.

For a full list of Chronosphere API endpoints, see:

For example, to list all buckets:

curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
     -X GET \
     "https://${CHRONOSPHERE_DOMAIN}/api/v1/config/buckets"

To create a bucket, send a POST request with JSON body:

curl -H "API-Token: ${CHRONOSPHERE_API_TOKEN}" \
     -X POST \
     --data '{"bucket": {"name": "My Test Bucket"}}' \
     "https://${CHRONOSPHERE_DOMAIN}/api/v1/config/buckets"