Can't see in dashboard any annotation added via API


I’m trying to use annotatios api. When I run this command:

curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -i 'http://IP:3000/api/annotations' --data '{"time": 1528697493, "tags": ["dev","deploy"], "text": "Sample text"}' -H "Authorization: Bearer eyJrIjoiUFVMZzI3RGl0QXQ3TWQ4bG1tb01aNEJ2cGZXcTg1ZkYiLCJuIjoiekJhdCIsImlkIjoxfQ=="

I get this response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 11 Jun 2018 06:21:18 GMT
Content-Length: 39
{"id":124,"message":"Annotation added"}

But my dashboard shows no annotation, this is how it’s configured:


PS: I’m running Grafana 5.1.3

1 Like

{“time”: 1528697493}

This bit me too – The docs don’t make it clear that they want epoch milliseconds not seconds. Multiply your time by 1000 and try again

OMG … that was it!

Thanks, you saved my day :smile: