Перейти к основному содержимому

Container Registry API (v2.1.1)

Managing registries, repositories, and tokens

Registries

List registries

List available container registries

Authorizations:
X-Auth-Token
query Parameters
limit
integer
Default: 10

limit

offset
integer
Default: 0

offset

search
string

search

sort_field
string (SortRegistriesField)
Default: "name"
Enum: "name" "createdAt" "size"

sort_field

sort_type
string (SortType)
Default: "asc"
Enum: "asc" "desc"

sort_type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create container registry

Create New Container registry

Authorizations:
X-Auth-Token
Request Body schema: application/json
required

Container Registry Params

name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "my-registry"
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "size": 5368709120,
  • "sizeLimit": 21474836480,
  • "status": "CREATING",
  • "used": 25
}

Delete container registry.

Delete container registry by ID

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID.

Responses

Response samples

Content type
application/json
{
  • "error": "error message"
}

Get registry information

Get registry information by ID

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "name": "string",
  • "size": 5368709120,
  • "sizeLimit": 21474836480,
  • "status": "CREATING",
  • "used": 25
}

List registries

List available container registries

Authorizations:
X-Auth-Token
query Parameters
limit
integer
Default: 10

limit

offset
integer
Default: 0

offset

search
string

search

sort_field
string (SortRegistriesField)
Default: "name"
Enum: "name" "createdAt" "size"

sort_field

sort_type
string (SortType)
Default: "asc"
Enum: "asc" "desc"

sort_type

Responses

Response samples

Content type
application/json
{
  • "registries": [
    ],
  • "totalCount": 0
}

Clusters integration

List integrated clusters

List clusters integrated with registry

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

Responses

Response samples

Content type
application/json
{
  • "clusters": [
    ],
  • "totalCount": 1
}

GC

Initiate registry garbage collection

Initiate registry garbage collection

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

query Parameters
delete-untagged
boolean

Delete untagged images

Responses

Response samples

Content type
application/json
{
  • "error": "garbage collection is in progress, please retry later"
}

Get information about the garbage size.

Returns information about the garbage size

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

Responses

Response samples

Content type
application/json
{
  • "sizeNonReferenced": 56723502,
  • "sizeSummary": 87639320,
  • "sizeUntagged": 30915818
}

Repositories

List repositories

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

query Parameters
limit
integer
Default: 10

Limit of repositories in response.

offset
integer
Default: 0

Number of repositories to skip.

search
string

Search repository by name.

sort_field
string (SortReposField)
Default: "name"
Enum: "name" "updatedAt" "size"

Sort repositories by field.

sort_type
string (SortType)
Default: "asc"
Enum: "asc" "desc"

Ascending or descending repositories sort.

short
boolean

Short output, return only repository names.

When short output is enabled, sorting can only be done by name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete repository

Delete repository by name

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

Responses

Response samples

Content type
application/json
{
  • "error": "garbage collection is in progress, please retry later"
}

Show repository information

Get information about repository by name

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "size": 0,
  • "type": "helm_chart",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Cleanup repository

Cleanup repository by name

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

Request Body schema: application/json
required

Cleanup repository params

digests
Array of strings

List of manifests to delete.

disable_gc
boolean
Default: false

Disable garbage collection after deletion of tags and manifests.

tags
Array of strings

List of tags to delete.

Responses

Request samples

Content type
application/json
{
  • "digests": [
    ],
  • "disable_gc": false,
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "deleted": [
    ],
  • "failed": [
    ]
}

List repository images

List repository images

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List of tags

List repository tags

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

Responses

Response samples

Content type
application/json
[
  • "string"
]

Delete manifest

Delete image by manifest digest

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

reference
required
string

digest.

Responses

Response samples

Content type
application/json
{
  • "error": "garbage collection is in progress, please retry later"
}

List of image layers

List of image layers

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

repository name.

reference
required
string

digest or tag.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List repositories

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

query Parameters
limit
integer
Default: 10

Limit of repositories in response.

offset
integer
Default: 0

Number of repositories to skip.

search
string

Search repository by name.

sort_field
string (SortReposField)
Default: "name"
Enum: "name" "updatedAt" "size"

Sort repositories by field.

sort_type
string (SortType)
Default: "asc"
Enum: "asc" "desc"

Ascending or descending repositories sort.

short
boolean

Short output, return only repository names.

When short output is enabled, sorting can only be done by name.

Responses

Response samples

Content type
application/json
{
  • "filteredCount": 0,
  • "repositories": [
    ],
  • "totalCount": 0
}

List repository images

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Container Registry ID

name
required
string

Repository name

query Parameters
limit
integer
Default: 10

Limit of images in response.

offset
integer
Default: 0

Number of images to skip.

search
string

Search image by tag or digest.

Responses

Response samples

Content type
application/json
{
  • "filteredCount": 0,
  • "images": [
    ],
  • "totalCount": 0
}

Tokens

Create a new token

Create new token

Authorizations:
X-Auth-Token
query Parameters
ttl
string
Default: "12h"
Enum: "12h" "1y"

Token TTL:

  • 12h - Create token for short time (12 hours)
  • 1y - Create token for long time 1 year
docker-config
boolean
Default: false

Return token as Docker config in JSON format

Responses

Response samples

Content type
application/json
{
  • "expireAt": 1609459200,
  • "expireIn": 43200,
  • "token": "44d570a1-21a7-404f-bbda-3a99872e2776"
}

Revoke token

Revoke token

Authorizations:
X-Auth-Token
path Parameters
token
required
string

Token.

Responses

Response samples

Content type
application/json
{
  • "error": "invalid token"
}

Validate token

Validate token

Authorizations:
X-Auth-Token
path Parameters
token
required
string

Token.

Responses

Response samples

Content type
application/json
{
  • "expireAt": 1609459200,
  • "expireIn": 43200
}

Refresh token

Refresh token

Authorizations:
X-Auth-Token
path Parameters
token
required
string

Token.

Responses

Response samples

Content type
application/json
{
  • "expireAt": 1609459200,
  • "expireIn": 43200
}

Tokens v2

List tokens

List tokens

Authorizations:
X-Auth-Token
query Parameters
limit
integer
Default: 10

limit

offset
integer
Default: 0

offset

sort_field
string (SortTokensField)
Default: "createdAt"
Enum: "name" "createdAt" "lastUsedAt" "expiresAt"

sort_field

sort_type
string (SortType)
Default: "asc"
Enum: "asc" "desc"

sort_type

search
string

search by name or uuid

scope_mode
string
Enum: "ro" "rw"

filter tokens by mode

Responses

Response samples

Content type
application/json
{
  • "tokens": [
    ],
  • "totalCount": 1
}

Create token

Create token

Authorizations:
X-Auth-Token
query Parameters
docker-config
boolean

Return token as Docker config JSON

Request Body schema: application/json
required

Create token request

required
object (TokenExpiration)
name
string

Token name

required
object (TokenScope)

Responses

Request samples

Content type
application/json
{
  • "expiration": {
    },
  • "name": "my-token",
  • "scope": {
    }
}

Response samples

Content type
application/json
{
  • "createdAt": "2023-02-13T15:00:00Z",
  • "expiration": {
    },
  • "id": "c29e3f63-0711-4772-a415-ad79973bdaef",
  • "name": "my-token",
  • "scope": {
    },
  • "status": "active",
  • "token": "<token>"
}

Delete token

Delete token

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Responses

Response samples

Content type
application/json
{
  • "error": "error message"
}

Get token

Get token

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2023-02-13T15:00:00Z",
  • "expiration": {
    },
  • "id": "c29e3f63-0711-4772-a415-ad79973bdaef",
  • "lastUsedAt": "2023-02-14T15:25:10Z",
  • "name": "my-token",
  • "scope": {
    },
  • "status": "active"
}

Update token

Update token

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Request Body schema: application/json
required

Update token request

object (TokenExpiration)
name
string
object (TokenScope)

Responses

Request samples

Content type
application/json
{
  • "name": "my-new-token",
  • "scope": {
    }
}

Response samples

Content type
application/json
{
  • "createdAt": "2023-02-13T15:00:00Z",
  • "expiration": {
    },
  • "id": "c29e3f63-0711-4772-a415-ad79973bdaef",
  • "lastUsedAt": "2023-02-14T15:25:10Z",
  • "name": "my-new-token",
  • "scope": {
    },
  • "status": "active"
}

Refresh token

Refresh token

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Request Body schema: application/json
required

Update token expiration

required
object (TokenExpiration)
expiresAt
string <date-time>
isSet
required
boolean

Responses

Request samples

Content type
application/json
{
  • "expiration": {
    }
}

Response samples

Content type
application/json
{
  • "createdAt": "2023-02-13T15:00:00Z",
  • "expiration": {
    },
  • "id": "c29e3f63-0711-4772-a415-ad79973bdaef",
  • "lastUsedAt": "2023-02-14T15:25:10Z",
  • "name": "my-token",
  • "scope": {
    },
  • "status": "active"
}

Regenerate token

Revoke token and generate a new one with the same properties

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Request Body schema: application/json
required

Token regeneration request

required
object (TokenExpiration)
expiresAt
string <date-time>
isSet
required
boolean

Responses

Request samples

Content type
application/json
{
  • "expiration": {
    }
}

Response samples

Content type
application/json
{
  • "createdAt": "2023-02-13T15:00:00Z",
  • "expiration": {
    },
  • "id": "c29e3f63-0711-4772-a415-ad79973bdaef",
  • "lastUsedAt": "2023-02-14T15:25:10Z",
  • "name": "my-token",
  • "scope": {
    },
  • "status": "active"
}

Revoke token

Revoke token

Authorizations:
X-Auth-Token
path Parameters
id
required
string

Token identifier

Responses

Response samples

Content type
application/json
{
  • "error": "error message"
}