Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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
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.
Save the username and password in the reponse sample for using the Docker commands.
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
For more information, refer to the the Docker Commands.
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 know more, explore the Docker Documentation. 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).
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:
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 .
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
.
400 Bad Request - The request made is invalid or corrupted
404 Not Found - The server did not find anything matching the request
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.
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
.
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.
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 |
---|---|---|---|
Field | Type | Description | Example |
---|---|---|---|
Field | Type | Description | Example |
---|---|---|---|
Header | Required | Type | Description |
---|---|---|---|
Field | Type | Description | Example |
---|
Save the hostname in the reponse sample for using the .
Field | Type | Description | Example |
---|
Field | Type | Description | Example |
---|
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
.
days
array
The days of the week selected.
Monday
time
string
The timestamp of creation of the registry
19:30:00+00:00
location
string
The location of the resource.
de/fra
name
string
The name of the registry. It must be unique within the folder.
Demo
days
array
The days of the week selected.
Monday
id
string
The ID of fetched output.
locations
type
string
The type of resource.
registry
createdBy
string
ID of the user or service account that initiated the operation.
sample@ionos.com
createdDate
string
The date when the operation was initiated.
h2022-10-07T14:30:06Z
days
array
The days of the week selected.
Sunday, Saturday
id
string
The id of the created token.
8fb592e4-494c-11ed-b878-0242ac120002
createdBy
string
The user who created the token.
sample@sample.com
createdByUserId
string
The ID of the user or service account that initiated the operation.
8fb59000-494c-11ed-0242ac120002
state
string
The status of the registry.
Running
hostname
string
The allocated hostname for the particular registry.
demo.cr.de-fra.test.com
createdBy | string | The user who created the token. |
|
type | string | The type of resource. |
|
createdByUserId | string | The ID of the user or service account that initiated the operation. |
|
createdDate | string | The date when the operation was initiated. |
|
state | string | The status of the registry. |
|
hostname | string | The allocated hostname for the particular registry. |
|
limit | number | The output value if specified in the request. |
|
id | string | The ID of the fetched output. |
|
type | string | The type of the resource that has been retrieved. |
|
href | URL (string) | URL to the object representation (absolute path). |
|
createdBy | string | The ID of the user or service account that initiated the operation. |
|
createdByUserId | string | The email ID of the user or service account that initiated the operation. |
|
location | string | The location of the resource. |
|
days | array | The days of the week selected. |
|
id | string | The id of the object that has been retrieved. |
|
type | string | The type of the resource that has been retrieved. |
|
ref | URL (string) | URL to the object representation (absolute path) |
|
items | array | The location of the container registry |
|
registryId | string | The ID of the registry to return. This is required. |
|
registryId | string | The ID of the registry to be deleted. It is a required field. |
|
limit | integer | The limit of the registries that have been retrieved | 5 |
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. |
|