Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
To create a container registry, you should be aware of available locations where you can create your container registry.
Note: The retrieved locations are read-only and cannot be changed.
200 OK - Successfully received the locations of a registry
Note:
Your values will differ from those in the sample code. Your response will have different locations
.
A location is identified by a combination of the following characters:
a two-character value in Id
represents a country (example: de
)
a three-character value in Id
represents a city. The locationId
is typically based on the IATA code of the city's airport (example: fra
).
Field | Type | Description | Example |
---|---|---|---|
id
string
The id of the object that has been retrieved.
locations
type
string
The type of the resource that has been retrieved.
collection
ref
URL (string)
URL to the object representation (absolute path)
https://api.ionos.com/cloudapi/v6/locations
items
array
The location of the container registry
"id": "de/fra"
The IONOS Cloud Container Registry service allows you to manage Docker and OCI compatible registries for use by your managed Kubernetes clusters. Use a container registry to make sure you have a private registry to effectively support pulling images.
Endpoint: https://api.ionos.com/containerregistries
To make authenticated requests to the API, you must include a few fields in the request headers. Please find relevant descriptions below:
We use curl
in our examples, as this tool is available on Windows 10, Linux and macOS. Please refer to our blogpost about curl
on Windows if you encounter any problems:
Once you have all the information about the available locations, you can check out the name of existing registries. The name you choose should be available and must not be already in use.
Note:
Your chosen name must be available for the registry.
All registry names must be unique.
Make sure the name is suitable for use in the new registry: it only uses the characters "a-z", "0-9" or "-", starts with a letter and ends with a letter or number, and can be from 3 to 63 characters long and is accessible.
You can retrieve all the existing registries to check out the available names.
You can update the limit value to get specific registries.
Field | Type | Description | Example |
---|---|---|---|
200 OK - Successfully showed the list of registries
Note: Your values will differ from those in the sample code. Your response will have a different id
and existing registries
.
Once you have fetched your required information, you can now create a new registry. For the registry, you can alter the days and time. You can also update the location based on the available container registry locations.
We assume the following prerequisites:
With the POST
request, you can create a container registry.
You can update the limit value to get specific registries based on the limit value being passed.
200 OK - Successfully showed the list of registries
Note:
Your values will differ from those in the sample code. The container registry will be created as shown in the 201 response. Your response will have a different id
, createdBy
and createdDate
.
Here, we do not get a hostname in the output because the host has not be allocated yet.
400 Bad Request - The request made is invalid or corrupted
To delete your container registry, destroying all container image data stored in it. The registryId
must be provided. You can get it through .
Delete the registry using the following curl
command:
Note: The sample requestID
is 789f8e3c-d5c8-4359-8f85-c200fb89e97c
Field | Type | Description | Example |
---|
204 - No Content
The request was successfully fulfilled and there is no content in the body.
404 Bad Request - Not Found
This way you can delete the registry completely.
This section shows you how to create a registry token. We assume the following prerequisite:
In this guide, we used test named repository to create registry tokens. Therefore, it is important that the you know your container registry name.
With the POST
request, you get the registry token. You will need to provide registry ID:
Note: The sample requestID
is 789f8e3c-d5c8-4359-8f85-c200fb89e97c
200 OK - Successfully showed the list of registries
Note:
Your values will differ from those in the sample code. Your response will have a different id
for your token.
409 - Conflict
If you want to push your local images to docker repository, you need to login to it using:
You need to enter the following options to login:
Hostname
Username
Password
You can push the images to your registry by providing all required information. You can query registries and look at images manifest, discover tags, delete layers and delete manifest etc. In the Docker API calls:
You can use the name of registry
Authenticate the API calls with a token
To delete your token, the registryId
and tokenId
to be deleted must be provided.
You can get registryId through and .
Delete the information about the token using the following curl
command:
Note: The sample requestID
is 779f8e3c-d5c8-4359-8f85-c200fb89e97c and the sample tokenID
is 4b120b87-91ab-4ec2-8952-cc771a37bd08
Field | Type | Description | Example |
---|
204 - No Content
The action was successful and the response body is empty.
400 Bad Request - The request made is invalid or corrupted
404 Bad Request - Not Found
This way you can delete a particular token.
Once you have created a repository using the and performed all operations you can delete the repository completely. Since does not allow to delete the entire repository, you can use IONOS Container Registry's API call for deleting the repository.
To delete your repository, the registryId and repository name for the repository to be deleted must be provided.
You can get registryId
through .
Delete the repository using the following curl
command:
Note: The sample requestID
is a8fb592e4-494c-11ed-b878-0242ac120002 and the sample registry_name
is test
Field | Type | Description | Example |
---|
204 - No Content
The request was successfully fulfilled and there is no content in the body.
Header | Required | Type | Description |
---|---|---|---|
Field | Type | Description | Example |
---|---|---|---|
Field | Type | Description | Example |
---|
Field | Type | Description | Example |
---|
Field | Type | Description | Example |
---|
Save the username and password in the reponse sample for using the .
For more information, refer to the the .
To know more, explore the . On the other hand, DCD uses an easy to opt passthrough feature which as discussed uses Basic Auth feature, so you dont need to use a separate authentication method for Data Center Designer (DCD).
Authorization
yes
string
HTTP Basic authorization. A base64 encoded string of a username and password separated by a colon. username@domain.tld:password
X-Contract-Number
no
integer
Users with more than one contract may apply this header to indicate the applicable contract.
Content-Type
yes
string
Set this to application/json
.
limit
integer
The limit of the registries that have been retrieved
5
limit
number
The output value if specified in the request.
5
id
string
The ID of the fetched output.
locations
type
string
The type of the resource that has been retrieved.
collection
href
URL (string)
URL to the object representation (absolute path).
https://api.ionos.com/cloudapi/v6/locations
createdBy
string
The ID of the user or service account that initiated the operation.
samplel@ionos.com
createdByUserId
string
The email ID of the user or service account that initiated the operation.
7ee77dcf-093f-48e6-9a14-161c73568589
location
string
The location of the resource.
es/vit
days
array
The days of the week selected.
Monday
days | array | The days of the week selected. |
|
time | string | The timestamp of creation of the registry |
|
location | string | The location of the resource. |
|
name | string | The name of the registry. It must be unique within the folder. |
|
days | array | The days of the week selected. |
|
id | string | The ID of fetched output. |
|
type | string | The type of resource. |
|
createdBy | string | ID of the user or service account that initiated the operation. |
|
createdDate | string | The date when the operation was initiated. |
|
days | array | The days of the week selected. |
|
id | string | The id of the created token. |
|
createdBy | string | The user who created the token. |
|
createdByUserId | string | The ID of the user or service account that initiated the operation. |
|
state | string | The status of the registry. |
|
hostname | string | The allocated hostname for the particular registry. |
|
registryId | string | The ID of the registry to be deleted. It is a required field. |
|
registryId | string | The ID of the registry to be deleted. |
|
tokenId | string | TThe associated ID of the token to be deleted. |
|
registryId | string | The ID of the registry to return. This is required. |
|
repository_name | string | The name of the registry. It must be unique within the folder. |
|
You can get the information for a particular container registry. At this point, a hostname will be allocated to your registry. The registry hostname becomes a part of your image or your manifest or the repository name.
With the GET
request, you can fetch the registry information by ID. The registryId
must be provided. You can get it through GET Registries API call.
Note: The sample requestID
is 789f8e3c-d5c8-4359-8f85-c200fb89e97c
Field | Type | Description | Example |
---|---|---|---|
200 OK - Successful operation
Note:
Your values will differ from those in the sample code. Your response will have a different id
and a hostname
.
Save the hostname in the reponse sample for using the Docker commands.
400 Bad Request - The request made is invalid or corrupted
404 Not Found - The server did not find anything matching the request
Field | Type | Description | Example |
---|---|---|---|
registryId
string
The ID of the registry to return. This is required.
789f8e3c-d5c8-4359-8f85-c200fb89e97
createdBy
string
The user who created the token.
sample@test.com
type
string
The type of resource.
registry
createdByUserId
string
The ID of the user or service account that initiated the operation.
8fb59000-494c-11ed-0242ac120002
createdDate
string
The date when the operation was initiated.
2022-10-07T14:30:06Z
state
string
The status of the registry.
Running
hostname
string
The allocated hostname for the particular registry.
demo.cr.de-fra.test.com