TokensApi

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

Examples

require 'time'
require 'ionoscloud-container-registry'
# setup authorization
IonoscloudContainerRegistry.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: tokenAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = IonoscloudContainerRegistry::TokensApi.new
registry_id = TODO # String | The unique ID of the registry
token_id = TODO # String | The unique ID of the token

begin
  # Delete token
  api_instance.registries_tokens_delete(registry_id, token_id)
rescue IonoscloudContainerRegistry::ApiError => e
  puts "Error when calling TokensApi->registries_tokens_delete: #{e}"
end

Using the registries_tokens_delete_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> registries_tokens_delete_with_http_info(registry_id, token_id)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

token_id

The unique ID of the token

Return type

nil (empty response body)

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

registries_tokens_find_by_id

registries_tokens_find_by_id(registry_id, token_id)

Get token information

Gets all information for a specific token used to access a container registry

Examples

Using the registries_tokens_find_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> registries_tokens_find_by_id_with_http_info(registry_id, token_id)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

token_id

The unique ID of the token

Return type

TokenResponse

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

registries_tokens_get

registries_tokens_get(registry_id, opts)

List all tokens for the container registry

Examples

Using the registries_tokens_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> registries_tokens_get_with_http_info(registry_id, opts)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

offset

String

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

String

The maximum number of elements to return (used together with offset for pagination)

[optional][default to '100']

Return type

TokensResponse

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

registries_tokens_patch

registries_tokens_patch(registry_id, token_id, patch_token_input)

Update token

Update token properties, for example: - change status to 'enabled' or 'disabled' - change expiry date

Examples

Using the registries_tokens_patch_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> registries_tokens_patch_with_http_info(registry_id, token_id, patch_token_input)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

token_id

The unique ID of the token

patch_token_input

Return type

TokenResponse

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

registries_tokens_post

registries_tokens_post(registry_id, post_token_input)

Create token

Create a token - password is only available once in the POST response

Examples

Using the registries_tokens_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> registries_tokens_post_with_http_info(registry_id, post_token_input)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

post_token_input

Return type

PostTokenOutput

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

registries_tokens_put

registries_tokens_put(registry_id, token_id, put_token_input)

Create or replace token

Create/replace a token - password is only available once in the create response - "name" cannot be changed

Examples

Using the registries_tokens_put_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> registries_tokens_put_with_http_info(registry_id, token_id, put_token_input)

Parameters

Name
Type
Description
Notes

registry_id

The unique ID of the registry

token_id

String

The unique ID of the token

put_token_input

Return type

PutTokenOutput

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

Last updated