All URIs are relative to https://api.ionos.com/containerregistries
Method
HTTP request
Description
DELETE /registries/{registryId}/tokens/{tokenId}
Delete token
GET /registries/{registryId}/tokens/{tokenId}
Get token information
GET /registries/{registryId}/tokens
List all tokens for the container registry
PATCH /registries/{registryId}/tokens/{tokenId}
Update token
POST /registries/{registryId}/tokens
Create token
PUT /registries/{registryId}/tokens/{tokenId}
Create or replace token
registries_tokens_delete
registries_tokens_delete(registry_id, token_id)
Delete token
Example
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
token_id = 'token_id_example' # str | The unique ID of the token
try:
# Delete token
api_instance.registries_tokens_delete(registry_id, token_id)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_delete: %s\n' % e)
Gets all information for a specific token used to access a container registry
Example
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
token_id = 'token_id_example' # str | The unique ID of the token
try:
# Get token information
api_response = api_instance.registries_tokens_find_by_id(registry_id, token_id)
print(api_response)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_find_by_id: %s\n' % e)
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
try:
# List all tokens for the container registry
api_response = api_instance.registries_tokens_get(registry_id)
print(api_response)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_get: %s\n' % e)
Parameters
Name
Type
Description
Notes
registry_id
str
The unique ID of the registry
offset
str
The first element (from the complete list of the elements) to include in the response (used together with limit for pagination)
[optional] [default to '0']
limit
str
The maximum number of elements to return (used together with offset for pagination)
Update token properties, for example: - change status to 'enabled' or 'disabled' - change expiry date
Example
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
token_id = 'token_id_example' # str | The unique ID of the token
patch_token_input = ionoscloud_container_registry.PatchTokenInput() # PatchTokenInput |
try:
# Update token
api_response = api_instance.registries_tokens_patch(registry_id, token_id, patch_token_input)
print(api_response)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_patch: %s\n' % e)
Create a token - password is only available once in the POST response
Example
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
post_token_input = ionoscloud_container_registry.PostTokenInput() # PostTokenInput |
try:
# Create token
api_response = api_instance.registries_tokens_post(registry_id, post_token_input)
print(api_response)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_post: %s\n' % e)
Create/replace a token - password is only available once in the create response - "name" cannot be changed
Example
from __future__ import print_function
import time
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
configuration = ionoscloud_container_registry.Configuration(
host = 'https://api.ionos.com/containerregistries',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.TokensApi(api_client)
registry_id = 'registry_id_example' # str | The unique ID of the registry
token_id = 'token_id_example' # str | The unique ID of the token
put_token_input = ionoscloud_container_registry.PutTokenInput() # PutTokenInput |
try:
# Create or replace token
api_response = api_instance.registries_tokens_put(registry_id, token_id, put_token_input)
print(api_response)
except ApiException as e:
print('Exception when calling TokensApi.registries_tokens_put: %s\n' % e)