Authentication
Authenticate every request with an API key generated from the ElemBio Cloud portal.
Both the ElemBio™ CLI and API authenticate by the same API keys created and managed in ElemBio Cloud. Generate a key from your account settings in the portal.
API key header
The API authenticates with the API key passed in the x-api-key header on every request.
curl -sSf "https://cloud-api.usw2.elembio.io/v1/auth" \
-H "x-api-key: ebp_s6iyTXunEXAMPLE"
The /v1/auth endpoint confirms the key and returns the tenant it belongs to and the scopes granted to it:
{
"tenantId": "your-tenant-id",
"scopes": ["runs:read", "executions:download"]
}
Scopes
API keys carry scopes of the form resource:action (for example runs:read or executions:download). A request that lacks the required scope returns a 403 with reason INSUFFICIENT_SCOPE. For the complete list of permissions, see API key permissions.
Store API keys securely and never share or commit them to source control. Follow the principle of least privilege by granting only the minimum permissions needed for each application or workflow, and rotate or revoke keys if they are compromised.
CLI credentials
The CLI stores credentials per profile in ~/.elembio/config.yaml, or reads them from the ELEMBIO_API_KEY environment variable. Environment variables take precedence over the config file. See CLI configuration and profiles.