Tokens

Define access permissions to registry resources

This tag groups all operations for tokens.

List all tokens for the container registry

get
Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Query parameters
offsetstringOptional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination)

Default: 0
limitstringOptional

The maximum number of elements to return (used together with offset for pagination)

Default: 100
Responses
200
OK
application/json
get
GET /containerregistries/registries/{registryId}/tokens HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "_links": {
    "next": "text",
    "previous": "text",
    "self": "text"
  },
  "count": 1,
  "href": "text",
  "id": "text",
  "items": [
    {
      "href": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "metadata": {
        "createdBy": "text",
        "createdByUserId": "text",
        "createdDate": "2025-07-17T03:22:54.593Z",
        "lastModifiedBy": "text",
        "lastModifiedByUserId": "text",
        "lastModifiedDate": "2025-07-17T03:22:54.593Z",
        "state": "text"
      },
      "properties": {
        "credentials": {
          "password": "",
          "username": "push-token"
        },
        "expiryDate": "2025-07-17T03:22:54.593Z",
        "name": "push-token",
        "scopes": [
          {
            "actions": [
              "pull",
              "push",
              "delete"
            ],
            "name": "*",
            "type": "repository"
          }
        ],
        "status": "enabled"
      },
      "type": "text"
    }
  ],
  "limit": 1,
  "offset": 1,
  "total": 1,
  "type": "text"
}

Create token

post

Create a token

  • password is only available once in the POST response

Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Body
Responses
201
Created
application/json
post
POST /containerregistries/registries/{registryId}/tokens HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 174

{
  "properties": {
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  }
}
{
  "href": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "metadata": {
    "createdBy": "text",
    "createdByUserId": "text",
    "createdDate": "2025-07-17T03:22:54.593Z",
    "lastModifiedBy": "text",
    "lastModifiedByUserId": "text",
    "lastModifiedDate": "2025-07-17T03:22:54.593Z",
    "state": "text"
  },
  "properties": {
    "credentials": {
      "password": "",
      "username": "push-token"
    },
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  },
  "type": "text"
}

Get token information

get

Gets all information for a specific token used to access a container registry

Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
tokenIdstring · uuidRequired

The unique ID of the token

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Responses
200
OK
application/json
get
GET /containerregistries/registries/{registryId}/tokens/{tokenId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "href": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "metadata": {
    "createdBy": "text",
    "createdByUserId": "text",
    "createdDate": "2025-07-17T03:22:54.593Z",
    "lastModifiedBy": "text",
    "lastModifiedByUserId": "text",
    "lastModifiedDate": "2025-07-17T03:22:54.593Z",
    "state": "text"
  },
  "properties": {
    "credentials": {
      "password": "",
      "username": "push-token"
    },
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  },
  "type": "text"
}

Create or replace token

put

Create/replace a token

  • password is only available once in the create response

  • "name" cannot be changed

Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
tokenIdstringRequired

The unique ID of the token

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Body
Responses
201
Created
application/json
put
PUT /containerregistries/registries/{registryId}/tokens/{tokenId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 174

{
  "properties": {
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  }
}
{
  "href": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "metadata": {
    "createdBy": "text",
    "createdByUserId": "text",
    "createdDate": "2025-07-17T03:22:54.593Z",
    "lastModifiedBy": "text",
    "lastModifiedByUserId": "text",
    "lastModifiedDate": "2025-07-17T03:22:54.593Z",
    "state": "text"
  },
  "properties": {
    "credentials": {
      "password": "",
      "username": "push-token"
    },
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  },
  "type": "text"
}

Delete token

delete
Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
tokenIdstring · uuidRequired

The unique ID of the token

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Responses
204
No Content
delete
DELETE /containerregistries/registries/{registryId}/tokens/{tokenId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Update token

patch

Update token properties, for example:

  • change status to 'enabled' or 'disabled'

  • change expiry date

Authorizations
Path parameters
registryIdstring · uuidRequired

The unique ID of the registry

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
tokenIdstring · uuidRequired

The unique ID of the token

Pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
Body
expiryDatestring · date-time | nullableOptional
statusstring · enumOptionalPossible values:
Responses
200
OK
application/json
patch
PATCH /containerregistries/registries/{registryId}/tokens/{tokenId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 139

{
  "expiryDate": "2025-07-17T03:22:54.593Z",
  "scopes": [
    {
      "actions": [
        "pull",
        "push",
        "delete"
      ],
      "name": "*",
      "type": "repository"
    }
  ],
  "status": "enabled"
}
{
  "href": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "metadata": {
    "createdBy": "text",
    "createdByUserId": "text",
    "createdDate": "2025-07-17T03:22:54.593Z",
    "lastModifiedBy": "text",
    "lastModifiedByUserId": "text",
    "lastModifiedDate": "2025-07-17T03:22:54.593Z",
    "state": "text"
  },
  "properties": {
    "credentials": {
      "password": "",
      "username": "push-token"
    },
    "expiryDate": "2025-07-17T03:22:54.593Z",
    "name": "push-token",
    "scopes": [
      {
        "actions": [
          "pull",
          "push",
          "delete"
        ],
        "name": "*",
        "type": "repository"
      }
    ],
    "status": "enabled"
  },
  "type": "text"
}

Was this helpful?