Dashboard API
Contents
Dashboard Snapshot PNG
GET /api/v3/grafana/render/?target=
Returns PNG image of a dashboard panel. To display any data on the graph you must include a ‘target’, you can append multiple targets to the request as follows: ?target=foo.bar.A&target=foo.bar.B
Parameters
target*
String
graphite query
from
String
Format: -<num>m|h|d|w|M|Y default: -6h
to
String
Format: now-<num>m|h|d|w|M|Y default: now
width
String
number measured in pixels default: 1000
height
String
number measured in pixels default: 500
style
String
Format: “light” | “dark ” default: dark
Curl Example:
Response:
<image data>
Bad Request Invalid form data
Unauthorized
Time Queries:
m= Minutesh= Hoursd= Daysw= WeeksM= MonthsY= Years
Create dashboard
POST /api/v3/grafana/dashboards/
Creates a new dashboard
Example:
Bad Request Invalid JSON
Conflict Dashboard already exists
Update dashboard
PUT /api/v3/grafana/dashboards/<uid>
Updates an existing dashboard
Example:
Bad Request Invalid JSON
Conflict Dashboard already exists
Get dashboard
GET /api/v3/grafana/dashboards/<uid>
Returns a dashboard given the dashboard's uid
Content-Type
application/json
Curl examples:
Response:
Bad Request No dashboard specified
Not Found Dashboard not found
Delete dashboard
DELETE /api/v3/grafana/dashboards/<uid>
Deletes a dashboard given the dashboard slug
Content-Type
application/json
Example:
Response:
Bad Request No dashboard specified
Dashboard not found
List dashboards
GET /api/v3/grafana/dashboards/
Returns a list of dashboards given a search query.
Content-Type
application/json
Example:
Response:
Bad Request Invalid form data
Grafana HTTP Dashboard API
To use the Grafana API, you will need to create a new Grafana Service Account Token within the Grafana UI (Settings => Service Accounts => Add Service Account with Admin role => Generate Service Account Token).

Additional Considerations:
Since MetricFire now hosts Grafana v9.5, dashboard JSON templates must now be wrapped in the following object, in order to create/update dashboards programatically ("folderID": 0, maps to the default "General" folder, but any folderID can be specified):
Last updated