How to set Grafana annotations programmatically [in Python]?

I have a Grafana dashboard which graphs my Ansible playbook’s events.

Now, I want to set the start of the Ansible playbook as an annotation, and the end of the playbook run as another annotation.

So, is there a way I can programmatically add the annotations to my grafana graphs [via Python]?

PS: All my metrics are custom CW metrics which are pulled to Grafana, using CloudWatch as the data source.

I’m not really that familiar with Cloudwatch but it does have annotation support. Maybe you can save the start and end events to Cloudwatch and then use that as an annotation source in Grafana.

Hi Danelle. Thanks for helping.

But apparently, AWS CloudWatch doesn’t have annotation support [as yet]. Possible to add the programmatically in Grafana dashboard somehow? [maybe via a Python api].

I’m just 2 days old with grafana. So, haven’t come across the Python wrapper yet [if there’s one]