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
0
votes
1 answer
How to import Grafana dashboard with Terraform?
I have multiple instances of Grafana. All instances should have the same dashboard. Therefore, I created the dashboard on one instance and exported it (see Export a dashboard). Now, I want to import the dashboard into another Grafana instance using…

dur
- 15,689
- 25
- 79
- 125
0
votes
1 answer
What to do with 500 error in Grafana Cloud API?
I'm trying to API query from Grafana Cloud.
I've got this JavaScript file:
const url = new URL('/' + '/loki/api/v1/labels', window.location.origin);
const user = '';
const apikey = '';
fetch(url.toString(), {
…

user22009348
- 19
- 5
0
votes
1 answer
Exporting alerts json data using Grafana API in Grafana v10
I am using Grafana cloud v10.0.3 and could not find any way to exports alerts json data. I tried to write a python script to access alerts json data but it is not showing any output. Below is the python script
import requests
import json
# Replace…

Faisal Shani
- 698
- 1
- 13
- 37
0
votes
0 answers
Credentials in JavaScript fetch()
I'm trying to query data from a Grafana Loki Cloud.
This works:
curl -s -G "https://:@.grafana.net/loki/api/v1/query_range" --data-urlencode 'query={job="maplejob"}'
credentials in link
If I move it into JavaScript like…

user22009348
- 19
- 5
0
votes
0 answers
{"message":"Invalid Basic Auth Header","traceID":""} GRAFANA
I installed grafana on my Linux VM using the following commands:
sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/enterprise/release/grafana-enterprise_9.5.2_amd64.deb
sudo dpkg -i grafana-enterprise_9.5.2_amd64.deb
The i…

albdev
- 43
- 5
0
votes
1 answer
Showing Memory utilization in Grafana dashboard
I have configured node exporter, grafana and prometheus through docker compose. I want to show Memory usage in the dashboard. I want to match the value shown with what is shown in the Ubuntu System monitor.
Below are my queries:
This is the…

MsA
- 2,599
- 3
- 22
- 47
0
votes
1 answer
How to check health/query a Tempo datasource using the Grafana API - v9.1.6
I want to test the connectivity between Grafana(v9.1.6) and a Tempo datasource using the API. In the documentation, it appears that I can use the GET path…
0
votes
0 answers
Does anyone know how to get query from query inspector in Grafana dashboard using http API via api request?
I'm trying to fetch data from query that is located in Grafana dashboard. I have an idea to get results from dashboard but not from the query inspector in Grafana.
I have fetched data from dashboard but not from the query inspector.
0
votes
0 answers
Grafana: DeSelect legend (not Disable) as config
There is Grafana panel for memory for kubernetes Deployment + Pod metrics. In the below image, there is 4 graphs -
Yellow - Total (overall) memory used by Deployment
Green - Average memory used per pod in Deployment
(& 4.) Blue & Red - Memory used…

Ashish Kumar
- 524
- 6
- 18
0
votes
1 answer
Grafana - Get paginated list of the Alert Rules
Does anybody know if there is a way to get a paginated list of the Alert Rules via the Grafana API. Specifically for Grafana versions 7.5.17 and 9.3.X
I found this endpoint for the version 9.3
/api/ruler/grafana/api/v1/rules
But this API marked as…
0
votes
0 answers
Filter context for PIE Chart in Grafana
Is there any feature present to filter data in dashboard by clicking on one of the values in pie chart??
This can be done with the table visualization. Is it possible for piechart??
for example: Refer pic(red circled part)- If I click on piechart…

ameesha gupta
- 101
- 11
0
votes
1 answer
how to create graph in grafana using Json data?
I have a sample json & I'm using JSON API plugin as i'm getting data from API
{
"data": [
{
"timeStamp": "2022-07-28 12:00:00",
"val": 10
},
{
"timeStamp": "2022-07-28 13:00:00",
…

Sasi Raj
- 21
- 5
0
votes
0 answers
Infinite Scrolling of Grafana Table Plugin with lazy Loading Query
I am trying to create a custom table plugin with infinite scroll with lazy loading of query.
I have a list of 50000 Rows and query loads all the data at a time i want to make it a infinite scroll with query calling 50 rows at a time and show them…
0
votes
0 answers
Grafana : Data source not automatically refreshing the query
Problem: When generating dashboard panels using Python Requests, unless the panel query is manually clicked ‘Run’ on Grafana UI, there is no data displayed.
Attached image shows how it does not display any panel data
Steps To Reproduce: Once the…

Starseamoon
- 41
- 6
0
votes
0 answers
Grafana 9.2.3 alert feature: How to export / import alerts as yml/json?
Is it possible to export all alerts of the Grafana 9.2.3 alerts to a json or yml file like all the other dashboards and datasources (and use it later in the provision process)?
I tried using grafana api, but it’s not returning anything.
Greetings…

Faizan Shah
- 11
- 1