Grafana Cloud API
The Grafana Cloud API is sometimes referred to as the Grafana.com API. It is a work in progress, however the following calls and paths on this page are static and approved for general use. If you hear of other paths and calls, know that they are subject to change and not generally maintained for user consumption.
Generate an API token in the Grafana.com user portal at
https://grafana.com/orgs/<org_slug>/api-keys. Make sure it has the “Admin” role.
Requests to the API are authenticated using the Authorization header:
Authorization: Bearer <grafana.com API token>
List API Keys
Create API Key
name (string) – API key name.
role (string) – Permission level of API key. One of “Viewer”, “Editor”, “Admin”, or “MetricsPublisher”.
Delete API Key
DELETE https://grafana.com/api/orgs/<org_slug>/api-keys/<api key name>
Note: Grafana Cloud Free includes 1 stack and Grafana Cloud Pro includes up to 3 stacks. Reach out to us about Grafana Cloud Advanced if you would like to add additional stacks to your account.
name (string) – Name of stack. Conventionally matches the url of the instance (e.g. “<stack_slug>.grafana.net”)
slug (string) – Subdomain that the Grafana instance will be available at (i.e. setting slug to “<stack_slug>” will make the instance available at “https://<stack_slug>.grafana.net”.
url (string, optional) – If a custom domain will be used for the instance it must be provided here (e.g “https://grafana.yourdoman.io”). Note that the custom domain must have a CNAME record set up that points to <stack_slug>.grafana.net before it can be specified.
Create Hosted Grafana instance API keys
This creates API keys specific to use for managing your hosted Grafana instance. This is different from Grafana Cloud API keys created for Grafana Cloud operations.
This endpoint requires the Admin role. See the Grafana docs for more details.
name (string) – Name of the API key.
role (string) – Access level/Grafana Role for the key. Can be one of the following values: Viewer, Editor or Admin.
secondsToLive (number, optional) – Key expiration in seconds. If it is a positive number an expiration date for the key is set. If it is null, zero or is omitted completely (unless api_key_max_seconds_to_live configuration option is set) the key will never expire.
Grafana Provisioned Data Sources
List Data Sources
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.