Skip to Content

API Keys

API keys provide programmatic access to the CloudQuery Platform API. Use them to automate workflows, integrate with CI/CD pipelines, or access platform features from scripts and external tools.

Prerequisites

You need admin permissions to create and manage API keys.

Creating an API key

  1. In the sidebar, click your user icon and select Admin Settings.
  2. Navigate to the API Keys section.
  3. Click Create API Key.
  4. Enter a Name to identify the key’s purpose (e.g., “CI/CD Pipeline” or “Terraform Integration”).
  5. Set an Expiration date. Preset options are 7 days, 30 days, and 1 year. You can also pick a custom date.
  6. Assign a Role to control what the key can access:
RoleDescription
admin:writeFull admin access — manage syncs, users, settings
admin:readRead-only admin access
general:writeRead and write access to non-admin features
general:readRead-only access to non-admin features
ciCI/CD pipeline access for syncs and deployments
schema-onlyAccess to table schemas only
  1. Click Create.

The API key value is displayed only once after creation. Copy it immediately and store it securely — you will not be able to view it again.

Using an API key

Include the key in the Authorization header of API requests:

curl -H "Authorization: Bearer <YOUR_API_KEY>" \ https://<YOUR_PLATFORM_URL>/api/plugins

API keys are also used for Platform Activation and plugin downloads from the CloudQuery Hub.

Managing API keys

The API keys list shows:

FieldDescription
NameThe identifier you assigned when creating the key
Created byThe email of the user who created the key
Created atWhen the key was created
Expires atWhen the key will stop working
Last usedThe last date the key was used (accurate to the day)
StatusWhether the key is active or expired

To delete a key, use the action menu on the key’s row. Deleted keys stop working immediately.

Best practices

  • Create separate keys for different use cases (CI/CD, monitoring, automation) so you can rotate or revoke them independently.
  • Set expiration dates. Avoid creating keys that never expire.
  • Store keys in a secrets manager (e.g., AWS Secrets Manager, HashiCorp Vault) rather than in plaintext configuration files.
Last updated on