Add this tag to questions regarding Grafana HTTP API. The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving dashboards, creating users and updating data sources.
Questions tagged [grafana-api]
161 questions
4
votes
1 answer
Ansible: Manage Grafana dashboards
I am trying to copy the import a Grafana dashboard to Grafana.
I am using the next module:
- name: Export dashboard
grafana_dashboard:
grafana_url: "http://{{ inventory_hostname }}:3000"
grafana_user: "user"
grafana_password:…

Asier Gomez
- 6,034
- 18
- 52
- 105
4
votes
2 answers
Unable to import grafana dashboard using exported json through CLI
I was trying to import dashboard using exported json file from one server to another server of grafana, but getting bellow error;
{"message":"Dashboard not found","status":"not-found"}
My curl command:
curl -X POST --insecure -H "Authorization:…

rajendra
- 73
- 1
- 5
4
votes
1 answer
How can we extract data from grafana dashboard?
Need to extract specific data from grafana dashboard. Grafana is connected to graphite in the backend. Seems there is no API to make calls to grafana directly.
Any help?
Ex: I need to extract AVG CPU value from graph of so and so server.

Krishna ps
- 71
- 2
- 6
4
votes
1 answer
How to use request parameter value in Grafana query string
I am using Grafana and my URL string is like:
http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi
How can i use the value of node i.e. "hanoi" in my Grafana Query string.
SELECT count("value") FROM "autogen"."sensor" WHERE…

Ammad
- 4,031
- 12
- 39
- 62
3
votes
2 answers
Can’t sign plugin using Grafana with Docker
I tried install this plugin to Grafana from github:
https://github.com/Vertamedia/chtable
I cloned this repository to pligins folder then added plugin to my grafana container:
grafana:
image: grafana/grafana
ports:
- '3000:3000'
…

Andreas Hunter
- 4,504
- 11
- 65
- 125
3
votes
1 answer
Automatic Authentication using Grafana API
In my web application, I want to provide the ability to pass authenticated users from my dashboard across to Grafana.
Once a user logged in my dashboard using credentials, a link to Grafana Dashboard will be displayed on my application. When user…

N'Bayramberdiyev
- 5,936
- 7
- 27
- 47
3
votes
3 answers
"message":"Failed to import dashboard" error while import grafana existing json file using HTTP API
I am trying to import to grafana existing json file using HTTP API, it's reading the json file successfully but for each and every line, it's throwing command not found error.
I tried to execute the below command,
curl -X POST --insecure -H…

sivanesan1
- 779
- 4
- 20
- 44
3
votes
1 answer
Programatically export images (png/jpg) of grafana dashboard
I have a visual in grafana. I can manually go to the menu click share -> snapshot -> rendering and export the snapshot. This works great. Is there a way I can script that in python?. Is there some api I can hit that will return the json of a…

CheTan Neve
- 67
- 1
- 10
3
votes
0 answers
Grafana import API will not return a proper dashboard ID (in response)after importing a new dashboard using API
While importing the dashboard, API is not returning proper dashboard ID.
For all the dashboard ID it provides id as 0
If I check the dashboard using Chrome Devtools > Network tab, I'm able to get some id (in increment order).
What Grafana version…

Mahadev Gouda
- 769
- 11
- 14
3
votes
1 answer
Grafana API - How to switch current organization
The docs about organizations (http://docs.grafana.org/http_api/org/) use the words current and actual organization which shows that there is a kind of "active" organization which you deal with. To get "current" organization, I use:
GET /api/org
and…

tgogos
- 23,218
- 20
- 96
- 128
2
votes
0 answers
Grafana alert is created with new alerting provisioning api, but not actually working
I am creating an alert for grafana using this endpoint POST /api/v1/provisioning/alert-rules with the bellow request body. The created alert is shown in the UI, but on the health column it's showing either an error, with the message failed to…

Ciprian Goia
- 21
- 2
2
votes
1 answer
Alerts repeating within minutes using Grafana Alerting
Using Grafana 9.2.2 with VictoriaMetrics as data source to send alerts when certain criteria is met.
Using an external service to deliver alerts by configuring an API as webhook contact point, over which the payload is sent and processed further to…

Niyanta
- 473
- 1
- 9
- 15
2
votes
2 answers
How to create contact point in grafana using API?
I am trying to create a contact point in grafana for pagerduty using grafana API.
Tried with the help of these URLS: AlertProvisioning HTTP_API
API call reference
YAML reference of data changed to JSON and tried this way, the YAML reference
But…

Jor-El
- 187
- 3
- 11
2
votes
0 answers
Grafana Renderer for Panels
I have a Grafana setup and running locally on my machine. I wanted to try
Get list of all dahboards and panels inside them.
Use grafana-image-renderer plugin to get the PNG images of all those panels.
Get the JSON data used to render those…

vp310
- 300
- 1
- 9
2
votes
2 answers
Export Grafana dashboard via API
I have a question about Grafana API.
I need to export the JSON models of all my dashboards that were made with the GUI in order to import them in another Grafana instance.
I tried with the dashboard API - api/dashboards/ using curl with the…

MetalHead
- 181
- 1
- 15