Hi all,
i want to use Ansible to deploy Grafana, Grafana Reporter (https://github.com/IzakMarais/reporter) and a couple of dashboards.
In those dashboards, i want to add a PDF exporter button through a Grafana link. In the URL, i need the API key value.
With the following curl command i have the key’s id, name and role but not the value…
curl http://admin:admin@localhost:3000/api/auth/keys
[{"id":1,"name":"grafana-reporter","role":"Viewer"}]
The key value is displayed only when i create the a new key:
curl 'http://admin:admin@localhost:3000/api/auth/keys' -XPOST -H 'Content-Type: application/json' -d '{"role":"Viewer","name":"grafana-reporter2"}'
{"name":"grafana-reporter2","key":"eyJrIjoieE5TQ210TG9YMXd5U2U2Q1dwZnB5ZkdZVFR4OHJNS1ciLCJuIjoiZ3JhZmFuYS1yZXBvcnRlcjIiLCJpZCI6MX0="}
Is there a way to get the key ?