Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v13.0/developer-resources/api-reference/http-api/examples/curl-examples.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v13.0/developer-resources/api-reference/http-api/examples/curl-examples/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
cURL examples
This page provides examples of calls to the Grafana API using cURL.
The most basic example for a dashboard for which there is no authentication. You can test the following on your local machine, assuming a default installation and anonymous access enabled, required:
curl http://localhost:3000/api/searchHere’s a cURL command that works for getting the home dashboard when you are running Grafana locally with basic authentication enabled using the default admin credentials:
curl http://admin:admin@localhost:3000/api/searchTo pass a username and password with HTTP basic authorization, encode them as base64. You can’t use authorization tokens in the request.
For example, to
list permissions associated with roles given a username of user and password of password, use:
curl --location '<grafana_url>/api/access-control/builtin-roles' --user 'user:password'Was this page helpful?
Related resources from Grafana Labs


