Thanks to visit codestin.com
Credit goes to www.debugbear.com

Skip to main content

Timeline Annotations API

Timeline annotations mark events on your performance charts (new releases, config changes, etc.).

This API lets you create them from CI / deploy scripts.

Create a timeline annotation

Call debugbear.annotations.create to create an annotation.

await debugbear.annotations.create(project.id, {
title: "Staging release",
description: "some description",
pageFilter: "",
date: new Date(),
});

Use debugbear.annotations.list(projectId) to retrieve annotations.

pageFilter property

A filter string to only apply the annotation to specific pages.

Use pageId:1234 if you want to add an annotation to just one specific page.

Using cURL

To create an annotation:

curl https://www.debugbear.com/api/v1/project/PROJECT_ID/annotation \
-X POST \
-H "x-api-key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "V5 release", "description": "some description", "pageFilter": "", "date": "2022-12-21T11:00:00.000Z"}'

To list annotations:

curl https://www.debugbear.com/api/v1/project/PROJECT_ID/annotations \
-H "x-api-key: API_KEY"