Skip to navigation

Create registry access token

Creates a Docker login credential for the registry. The username and secret are returned once and cannot be read again. The registry must be active, and the registry service asks Billing whether the workspace may create credentials. Requires scope: container-registry.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# REGISTRY_ID: Registry ID
curl -X POST "https://api.ibee.ai/v1/container-registry/registries/$REGISTRY_ID/access-tokens?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"token_name": "<token_name>"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

registry_idstringRequiredformat: "uuid"
Registry ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
token_namestringRequiredformat: "^[a-z][a-z0-9-]{1,62}[a-z0-9]$"3-64 characters
Unique among the organization's active tokens.
permissionenumOptionalDefaults to PULL
  • PULL: pull only (default).
  • PULL_PUSH: pull and push.
Allowed values:
expires_in_daysintegerOptionalDefaults to 90

1 to 365, or -1 for a token that does not expire.

descriptionstringOptional<=255 charactersDefaults to

Optional description (up to 255 characters).

registry_idslist of stringsOptional
Other registries in the same workspace the token may also use. The registry in the path is always included.

Response

Token created. Store the secret now.
token_idstringformat: "uuid"
Unique ID of the token.
token_namestring
Name of the token.
usernamestring

Docker login username. It contains $, so quote it in shells.

secretstring
Docker login password. Returned only by create and rotate.
permissionenum

What a registry access token may do.

  • PULL: pull images.
  • PULL_PUSH: pull and push images.
Allowed values:
registry_idslist of strings
Registries the token may use.
expires_atdatetime or null

When the token expires (ISO 8601); null for a token that does not expire.

created_atdatetime

When the token was created (ISO 8601).

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error