Chronosphere supports only publicly documented API endpoints. Undocumented, private,
or experimental API endpoints might change without warning.
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 tokens.Send requests
Send requests to your Chronosphere Observability Platform domain, which must include your Chronosphere API token in anAPI-Token HTTP header.
For example, you can pass the token and domain using environment variables to the
curl command:
TOKEN: Your API token.INSTANCE: The subdomain name for your organization’s Observability Platform instance.METHOD: The HTTP method to use with the request, such asGETorPOST.ENDPOINT_PATH: The specific endpoint you want to access.
Chronoctl also uses the environment variable
CHRONOSPHERE_API_TOKEN.Use an API token
You can use an API token to make HTTP API calls. For HTTP calls, use theAuthorization header with the Bearer token authentication
scheme.
For example, to use the API token to call the Query API with curl, run:
Pagination
All endpoints that list objects are paginated, which means the server can potentially return only a subset, or page, of the requested objects, along with an opaque page token the client can use to fetch the next page of objects. To request the first page, provide an empty page token. If there are no more pages to request, the server returns an empty page token. If you use filter arguments, the client must pass the same filters on each page request in a single iteration. If you use new filter arguments, restart pagination by requesting the first page with the new filters. This example demonstrates the process to iterate over every monitor:-
Request the first page by sending a plain request with no page token:
The server responds with:
-
The response has a non-empty
page.next_tokenfield, which means you must send another request with this page token to fetch the next page of monitors:The server responds with: -
Because the non-empty
page.next_tokenresponse field indicates there are more results to fetch, request the next page:The server responds with: -
When you get a response with an empty
page.next_tokenfield, you have reached the final page of results.