Zuplo
API Keys

Buckets and Environments

API keys are stored in "buckets," which organize and isolate authentication credentials across different environments. Learn more in the API Key API documentation.

Default bucket configuration

Zuplo automatically creates three buckets for each project:

  • Working copy: Stores API keys for the working-copy environment
  • Production: Stores API keys for the production environment (your default Git branch)
  • Shared: Stores API keys shared across all other environments

Custom bucket configuration

To use a custom bucket, specify the bucketName in your API Key policy options:

JSONCode
{ "export": "ApiKeyInboundPolicy", "module": "$import(@zuplo/runtime)", "options": { "bucketName": "contoso-qa-env", "allowUnauthenticatedRequests": false } }

When no bucketName appears in the configuration, the policy uses the default bucket for the current environment.

Creating custom buckets

Create custom buckets using the API Key management API. See the create buckets endpoint for details.

The following example creates a bucket for a QA environment:

TerminalCode
curl --request POST \ --url https://dev.zuplo.com/v1/accounts/YOUR_ACCOUNT_NAME/key-buckets \ --header 'Authorization: Bearer YOUR_ZAPI_KEY' \ --header 'Content-Type: application/json' \ --data '{"name":"contoso-qa-bucket","description":"API Key bucket for QA Environment"}'

Replace YOUR_ACCOUNT_NAME with your account name and YOUR_ZAPI_KEY with your Zuplo API key.

Last modified on