Skip to main content

API Keys

CLOUD

Introduction​

API keys let you access Dragonfly Cloud programmatically, without a user session. Common uses include scraping the Prometheus-compatible metrics endpoint and authenticating the Terraform provider.

Creating an API Key​

  • Navigate to the Account > API Keys tab in Dragonfly Cloud.
  • Click the +API Key button to open the Create Key dialog.
  • Enter a meaningful name for the key (e.g., metrics).
  • Select the desired access level in the Permissions dropdown (for example, Read Metrics).
  • Click Create, and the dialog will show the created key.
  • Click Copy API Key to copy the key to the clipboard.
warning

Dragonfly Cloud does not store the key itself. Store it somewhere secure, as it cannot be shown again.

Using an API Key​

Pass the key in the Authorization header as a bearer token:

# Replace with your API key.
$> KEY="dragonflydb_eyJpI...fQ=="

$> curl https://api.dragonflydb.cloud/v1/metrics -H "Authorization: Bearer $KEY"

Managing and Revoking Keys​

All keys in your account are listed in the Account > API Keys tab. Delete a key there to revoke it immediately. Create a separate key per integration so each can be rotated or revoked independently.