For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delete Repository

Once you have created a repository using the Docker URIs and completed your operations, you may want to delete it. As the Docker Registry V2 API does not support deleting entire repositories, you must use the IONOS CLOUD Private Container Registry API. To perform this operation, you need:

  • The repository_name you wish to delete. For more information about retrieving a list of repositories, see Retrieve all Repositories.

  • The registryId, which can be obtained through the GET Registries API call.

Request

Run the following curl command to delete the repository:

Note:

  • In the following code, the sample registryId is 8fb592e4-494c-11ed-b878-0242ac120002 and repository_name is dev/tests.

  • The repository name in the API URL must be URL-encoded. For example, dev/tests should be written as dev%2Ftests to prevent the slash from being interpreted as a path separator and causing a 404 error.

curl --location \
--header 'Authorization: Bearer ${TOKEN}' \
--request DELETE 'https://api.ionos.com/containerregistries/registries/8fb592e4-494c-11ed-b878-0242ac120002/repositories/dev%2Ftests'

Path parameters

Field

Type

Description

Example

registryId

string

The ID of the Private Container Registry to be returned. This is required.

8fb592e4-494c-11ed-b878-0242ac120002

repository_name

string

The name of the Private Container Registry. It must be unique within the folder.

dev%2Ftests

Response

Upon success, the server returns 204 - No Content to indicate the request was fulfilled without a response body.

Last updated

Was this helpful?