Delete multiple Annotations in a single call

I had a demo script that entered annotations several times a minute and was not aware that these were accumulating in the grafana.db. (I mistakenly thought that the retention policy on my time series db would take care of old entries).

To clean out all this crud, I rolled a compound API call, which will now run for days :upside_down_face:.
Is there a way to DELETE more than a single Annotation (docs show only specification of Id or RangeId)?

Such a method would make the process much more efficient.

Thanks for any pointers,
Best wishes,


I looked a bit into the code and find an undocumented POST /annotations/mass-delete endpoint that accept the following body:


I never used it though, do not hesitate to post more questions if it doesnโ€™t work as expected.

Super kind agnestoulet1,

I need to check this some more and see how it works. First tests were good.

It may be that I just start with a fresh grafana.db to loose all that crud.

Great that you found that API call for me.

Brest wishes,