Nobl9 Annotations API (v1alpha)
Using Nobl9 Annotations API, you can create new annotations, fetch existing ones, or delete them.
You can find more detailed information on SLO Annotations in the respective section of Nobl9 documentation.
A quota limits the number of user annotations - there is a limit of 100 000 annotations per organization.
For rate limits, see the Rate limits section below.
Generate access token
To generate access token, you must provide Authorization header with the Basic
scheme.
The access token consists of your Client ID and Client Secret in the following format: clientId:clientSecret
.
Rate Limits for access token
All requests to the endpoint /api/accessToken
are rate limited. An organization can make 1 request per 3 seconds.
The API returns the 429 HTTP
status code when this limit is exceeded.
Your token will be valid for 1 hour. Minimize the usage of this endpoint and reuse the token until it expires.
We recommend downloading your token once and reusing it in your CI/CD pipeline. Generating multiple tokens may exceed your rate limits.
Authorizations:
header Parameters
Organization required | string Your organization ID. You can find it in the Nobl9 UI, in the Settings > Account. |
Responses
Request samples
- cURL
curl -X \ POST https://app.nobl9.com/api/accessToken -H 'Accept: application/json; version=v1alpha' \ -H 'Organization: nobl9-dev' \ -H 'Authorization: Basic ${encoded_access_keys}'
Response samples
- 200
{- "access_token": "string"
}
Get a list of Annotations
Get Annotations with the values specified in a request.
Authorizations:
query Parameters
name | Array of strings The name of the annotation. You can provide multiple names. The query matches all the names. |
slo | string The name of the SLO to which the annotations are attached. |
from | string <date-time> Matches |
to | string <date-time> Matches |
header Parameters
Organization required | string Your organization ID. You can find it in the Nobl9 UI, in the Settings > Account. |
Project required | string Project name, must conform to DNS (RFC 1123 format). might be wildcard with |
Responses
Request samples
- cURL
curl -X \ GET https://app.nobl9.com/api/annotations?from=2021-12-07T08:00:00Z&to=2021-12-08T13:00:00Z&name=my-annotation-1&name=my-annotation-2&slo=my-slo' -H 'Accept: application/json; version=v1alpha' \ -H 'Organization: nobl9-dev' \ -H 'Project: *' \ -H 'Authorization: Bearer ${access_token}'
Response samples
- 200
[- {
- "description": "string",
- "endTime": "2006-01-02T17:04:05Z",
- "name": "my-annotation-name",
- "project": "default",
- "slo": "my-slo-name",
- "startTime": "2006-01-02T17:04:05Z",
- "status": {
- "updatedAt": "2006-01-02T17:04:05Z"
}
}
]
Create single Annotation
You can update Annotations using a standard PUT
request. This method will create a new annotation unless the annotation with the provided name (i.e. specified in the body of the JSON object) does not exist in the specified Project.
In addition, you must also provide all the remaining parameters even if you want to update just one of them (effectively, this command acts like a REPLACE
command).
Authorizations:
header Parameters
Organization required | string Your organization ID. You can find it in the Nobl9 UI, in the Settings > Account. |
Request Body schema: application/jsonrequired
JSON object keys
description required | string <= 1000 characters |
endTime required | string <date-time> End time of the Annotation period in RFC3339 format. |
name required | string The name of the Annotation. |
project required | string Must conform to DNS (RFC 1123 format). |
slo required | string The name of the SLO to which the Annotation is attached. |
startTime required | string <date-time> Start time of the Annotation period in RFC3339 format. |
Responses
Request samples
- Payload
- cURL
{- "description": "string",
- "endTime": "2006-01-02T17:04:05Z",
- "name": "name",
- "project": "default",
- "slo": "my-slo-name",
- "startTime": "2006-01-02T17:04:05Z"
}
Response samples
- 200
{- "description": "string",
- "endTime": "2006-01-02T17:04:05Z",
- "name": "my-annotation-name",
- "project": "default",
- "slo": "my-slo-name",
- "startTime": "2006-01-02T17:04:05Z",
- "status": {
- "updatedAt": "2006-01-02T17:04:05Z"
}
}
Delete single Annotation
This endpoint deletes the annotation with the given name in the specified project (Project
header).
You must provide explicit project name, not wildcard.
Only Organization Admins can delete system annotations, for example, when a false alert was triggered. Users with other permissions can only view system annotations.
Authorizations:
path Parameters
name required | string Annotation name |
header Parameters
Organization required | string Your organization ID. You can find it in the Nobl9 UI, in the Settings > Account. |
Project required | string Project name, must be explicit, wildcard is not supported |
Responses
Request samples
- cURL
curl -X \ DELETE https://app.nobl9.com/api/annotations/my-annotation -H 'Accept: application/json; version=v1alpha' \ -H 'Organization: my-org' \ -H 'Project: my-project' \ -H 'Authorization: Bearer ${access_token}'
Upsert single Annotation
Create a new Annotation for any event within one of your SLOs.
Authorizations:
path Parameters
name required | string Annotation name |
header Parameters
Organization required | string Your organization ID. You can find it in the Nobl9 UI, in the Settings > Account. |
Request Body schema: application/jsonrequired
Annotations' details
description required | string <= 1000 characters |
endTime required | string <date-time> End time of the Annotation period in RFC3339 format. |
project required | string String, must conform to DNS (RFC 1123 format). |
slo required | string The name of the SLO to which the Annotation is attached. |
startTime required | string <date-time> Start time of the Annotation period in RFC3339 format. |
Responses
Request samples
- Payload
- cURL
{- "description": "string",
- "endTime": "2006-01-02T17:04:05Z",
- "project": "default",
- "slo": "my-slo-name",
- "startTime": "2006-01-02T17:04:05Z"
}
Response samples
- 200
{- "description": "string",
- "endTime": "2006-01-02T17:04:05Z",
- "name": "my-annotation-name",
- "project": "default",
- "slo": "my-slo-name",
- "startTime": "2006-01-02T17:04:05Z",
- "status": {
- "updatedAt": "2006-01-02T17:04:05Z"
}
}