Overview

Create annotation

Create annotation

POST/v2/annotations
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Input7
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
datasetsstring[] · bodyrequired
array of dataset names for which the annotation appears on charts
descriptionstring · body
Explanation of the event the annotation marks on the charts
endTimestring · body
End time of the annotation
timestring · body
Time the annotation marks on the charts. If you don't include this field, Axiom assigns the time of the API request to the annotation.
titlestring · body
Summary of the annotation that appears on the charts
typestring · bodyrequired
Type of the event marked by the annotation. Use only alphanumeric characters or hyphens. For example, "production-deployment".
urlstring · body
URL relevant for the event marked by the annotation. For example, link to GitHub pull request.
Output8
datasetsstring[]
array of dataset names for which the annotation appears on charts
descriptionstring
Explanation of the event the annotation marks on the charts
endTimestring
End time of the annotation
idstring
timestring
Time the annotation marks on the charts. If you don't include this field, Axiom assigns the time of the API request to the annotation.
titlestring
Summary of the annotation that appears on the charts
typestring
Type of the event marked by the annotation. Use only alphanumeric characters or hyphens. For example, "production-deployment".
urlstring
URL relevant for the event marked by the annotation. For example, link to GitHub pull request.
Responses
201Annotation
Example input
curl -X POST 'https://api.axiom.co/v2/annotations' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"datasets":["string"],"type":"string"}'
Example output
{
  "datasets": [
    "my-dataset"
  ],
  "description": "Deploy new feature to the sales form",
  "endTime": "2024-02-06T11:39:28.382Z",
  "id": "ann_123",
  "time": "2024-02-06T10:39:28.382Z",
  "title": "Production deployment",
  "type": "deploy",
  "url": "https://example.com"
}

Updated

Was this page helpful?