Skip to main content

Annotations

Oodle supports creating, updating, listing, and deleting annotations via HTTP API. Use annotations to mark deployment events, releases, configuration changes, or any significant event on your dashboards as vertical markers on time-series panels.

Authentication

All requests require an API key passed in the X-API-KEY header. You can find your API key on the Settings > Integrations page in the Oodle UI.

Create an annotation

curl -X POST \
https://<API_DOMAIN>/v1/api/instance/<INSTANCE_ID>/grafana/annotations \
-H "Content-Type: application/json" \
-H "X-API-KEY: <API_KEY>" \
-d "{
\"text\": \"Deployed v1.2.3 to production\",
\"tags\": [\"deployment\", \"production\"],
\"time\": $(date +%s)000
}"

Request body

FieldTypeRequiredDescription
textstringYesDescription of the event
tagsstring[]NoTags for filtering annotations
timeint64NoStart time in epoch milliseconds (defaults to now)
timeEndint64NoEnd time in epoch ms (for range annotations)
dashboardIdint64NoScope to a specific dashboard
panelIdint64NoScope to a specific panel

Response

{
"id": 42,
"message": "Annotation added"
}

List annotations

curl \
"https://<API_DOMAIN>/v1/api/instance/<INSTANCE_ID>/grafana/annotations?tags=deployment&limit=10" \
-H "X-API-KEY: <API_KEY>"

Query parameters

ParameterTypeDescription
fromint64Start of time range (epoch ms)
toint64End of time range (epoch ms)
tagsstringFilter by tag (repeat for multiple)
dashboardIdint64Filter by dashboard ID
panelIdint64Filter by panel ID
limitint32Max annotations to return

Response

[
{
"id": 42,
"dashboardId": 1,
"dashboardUID": "abc123",
"panelId": 0,
"time": 1718000000000,
"timeEnd": 0,
"text": "Deployed v1.2.3 to production",
"tags": ["deployment", "production"],
"created": 1718000000000,
"updated": 1718000000000
}
]

Update an annotation

curl -X PUT \
"https://<API_DOMAIN>/v1/api/instance/<INSTANCE_ID>/grafana/annotations/<ANNOTATION_ID>" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <API_KEY>" \
-d '{
"text": "Deployed v1.2.4 (hotfix)",
"tags": ["deployment", "hotfix"]
}'

Request body

FieldTypeRequiredDescription
textstringYesUpdated description
tagsstring[]NoUpdated tags
timeint64NoUpdated start time (epoch ms)
timeEndint64NoUpdated end time (epoch ms)

Response

{
"message": "Annotation updated"
}

Delete an annotation

curl -X DELETE \
"https://<API_DOMAIN>/v1/api/instance/<INSTANCE_ID>/grafana/annotations/<ANNOTATION_ID>" \
-H "X-API-KEY: <API_KEY>"

Response

{
"message": "Annotation deleted"
}

CI/CD integration

Add annotation creation to your CI/CD pipeline to automatically mark deployments on dashboards:

GitHub Actions

- name: Create deployment annotation
run: |
curl -X POST \
"https://${{ secrets.OODLE_API_DOMAIN }}/v1/api/instance/${{ secrets.OODLE_INSTANCE }}/grafana/annotations" \
-H "Content-Type: application/json" \
-H "X-API-KEY: ${{ secrets.OODLE_API_KEY }}" \
-d "{
\"text\": \"Deployed ${{ github.sha }} to production\",
\"tags\": [\"deployment\", \"${{ github.ref_name }}\"],
\"time\": $(date +%s)000
}"

Integration setup

You can find the API domain, instance ID, and API key on the Annotations tile in the Integrations page of the Oodle UI.


Support

If you need assistance or have any questions, please reach out to us through: