ReferenceCreate Grafana Cloud API keys

Create a Grafana Cloud API key

To interact programmatically with Grafana Cloud, you need an API key with proper permissions.

Note: Only administrators can create or delete API keys. See Grafana Cloud roles and permissions for more information.

  1. Log into your Grafana Cloud account to land in the Cloud Portal.
  2. Select the organization that you want to add an API key to, by selecting from the dropdown in top left.
  3. Click API Keys from the SECURITY section on the left.
  4. Click +Add API Key.
  5. In API Key Name, enter a name for your API key.
  6. In Role, select the user role to associate with this API key. For example, if you want people or software using this key to only have Viewer role permissions, then select Viewer. The roles and permissions available match the Grafana Cloud roles and permissions, with a couple additions:
  • MetricsPublisher is only given permission to send log and metric data to Grafana Cloud
  • PluginPublisher is only given permission to create and publish plugins

Note: Always create API keys for specific tasks, according to the principle of least privilege. It is better to create multiple API keys for a human user account to use, each for specific tasks, than to create and always use an API key with the abilities needed for the most privileged task. In other words, don’t just create an Admin key and use it for everything.

  1. Click Create API Key.
  2. A token is created and displayed. Copy the token and store it in a safe place, because it will not be displayed again.
  3. Click Close when finished.