# RegistriesApi

## RegistriesApi

All URIs are relative to *<https://api.ionos.com/containerregistries>*

| Method                                                 | HTTP request                        | Description                            |
| ------------------------------------------------------ | ----------------------------------- | -------------------------------------- |
| [**registries\_delete**](#registries_delete)           | **DELETE** /registries/{registryId} | Delete registry                        |
| [**registries\_find\_by\_id**](#registries_find_by_id) | **GET** /registries/{registryId}    | Get a registry                         |
| [**registries\_get**](#registries_get)                 | **GET** /registries                 | List all container registries          |
| [**registries\_patch**](#registries_patch)             | **PATCH** /registries/{registryId}  | Update the properties of a registry    |
| [**registries\_post**](#registries_post)               | **POST** /registries                | Create container registry              |
| [**registries\_put**](#registries_put)                 | **PUT** /registries/{registryId}    | Create or replace a container registry |

## **registries\_delete**

> registries\_delete(registry\_id)

Delete registry

#### Example

```python
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.RegistriesApi(api_client)
    registry_id = 'registry_id_example' # str | The unique ID of the registry
    try:
        # Delete registry
        api_instance.registries_delete(registry_id)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_delete: %s\n' % e)
```

#### Parameters

| Name             | Type    | Description                   | Notes |
| ---------------- | ------- | ----------------------------- | ----- |
| **registry\_id** | **str** | The unique ID of the registry |       |

#### Return type

void (empty response body)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **registries\_find\_by\_id**

> RegistryResponse registries\_find\_by\_id(registry\_id)

Get a registry

Get all information for a specific container registry

#### Example

```python
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.RegistriesApi(api_client)
    registry_id = 'registry_id_example' # str | The unique ID of the registry
    try:
        # Get a registry
        api_response = api_instance.registries_find_by_id(registry_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_find_by_id: %s\n' % e)
```

#### Parameters

| Name             | Type    | Description                   | Notes |
| ---------------- | ------- | ----------------------------- | ----- |
| **registry\_id** | **str** | The unique ID of the registry |       |

#### Return type

[**RegistryResponse**](/container-registry-sdk-python/models/registryresponse.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **registries\_get**

> RegistriesResponse registries\_get(filter\_name=filter\_name, limit=limit, pagination\_token=pagination\_token)

List all container registries

List all managed container registries for your account

#### Example

```python
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.RegistriesApi(api_client)
    try:
        # List all container registries
        api_response = api_instance.registries_get()
        print(api_response)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_get: %s\n' % e)
```

#### Parameters

| Name                  | Type    | Description                                                                                   | Notes                           |
| --------------------- | ------- | --------------------------------------------------------------------------------------------- | ------------------------------- |
| **filter\_name**      | **str** | The registry name to search for                                                               | \[optional]                     |
| **limit**             | **str** | The maximum number of elements to return (used together with pagination.token for pagination) | \[optional] \[default to '100'] |
| **pagination\_token** | **str** | An opaque token used to iterate the set of results (used together with limit for pagination)  | \[optional]                     |

#### Return type

[**RegistriesResponse**](/container-registry-sdk-python/models/registriesresponse.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **registries\_patch**

> RegistryResponse registries\_patch(registry\_id, patch\_registry\_input)

Update the properties of a registry

Update the properties of a registry - "garbageCollectionSchedule" time and days of the week for runs

#### Example

```python
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.RegistriesApi(api_client)
    registry_id = 'registry_id_example' # str | The unique ID of the registry
    patch_registry_input = ionoscloud_container_registry.PatchRegistryInput() # PatchRegistryInput | 
    try:
        # Update the properties of a registry
        api_response = api_instance.registries_patch(registry_id, patch_registry_input)
        print(api_response)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_patch: %s\n' % e)
```

#### Parameters

| Name                       | Type                                                                                  | Description                   | Notes |
| -------------------------- | ------------------------------------------------------------------------------------- | ----------------------------- | ----- |
| **registry\_id**           | **str**                                                                               | The unique ID of the registry |       |
| **patch\_registry\_input** | [**PatchRegistryInput**](/container-registry-sdk-python/models/patchregistryinput.md) |                               |       |

#### Return type

[**RegistryResponse**](/container-registry-sdk-python/models/registryresponse.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **registries\_post**

> PostRegistryOutput registries\_post(post\_registry\_input)

Create container registry

Create a registry to hold container images or OCI compliant artifacts - "name" must have passed validation - "location" must be one of the available location IDs - "garbageCollectionSchedule" time and days of the week for runs - "features": "vulnerabilityScanning" default is enabled

#### Example

```python
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.RegistriesApi(api_client)
    post_registry_input = ionoscloud_container_registry.PostRegistryInput() # PostRegistryInput | 
    try:
        # Create container registry
        api_response = api_instance.registries_post(post_registry_input)
        print(api_response)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_post: %s\n' % e)
```

#### Parameters

| Name                      | Type                                                                                | Description | Notes |
| ------------------------- | ----------------------------------------------------------------------------------- | ----------- | ----- |
| **post\_registry\_input** | [**PostRegistryInput**](/container-registry-sdk-python/models/postregistryinput.md) |             |       |

#### Return type

[**PostRegistryOutput**](/container-registry-sdk-python/models/postregistryoutput.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **registries\_put**

> PutRegistryOutput registries\_put(registry\_id, put\_registry\_input)

Create or replace a container registry

Create/replace a registry to hold container images or OCI compliant artifacts **On create** - "name" must have passed validation - "location" must be one of the available location IDs **On update** - "name" cannot be changed - "location" cannot be changed **On create or update** - "garbageCollectionSchedule": time and days of the week for runs

#### Example

```python
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.RegistriesApi(api_client)
    registry_id = 'registry_id_example' # str | The unique ID of the registry
    put_registry_input = ionoscloud_container_registry.PutRegistryInput() # PutRegistryInput | 
    try:
        # Create or replace a container registry
        api_response = api_instance.registries_put(registry_id, put_registry_input)
        print(api_response)
    except ApiException as e:
        print('Exception when calling RegistriesApi.registries_put: %s\n' % e)
```

#### Parameters

| Name                     | Type                                                                              | Description                   | Notes |
| ------------------------ | --------------------------------------------------------------------------------- | ----------------------------- | ----- |
| **registry\_id**         | **str**                                                                           | The unique ID of the registry |       |
| **put\_registry\_input** | [**PutRegistryInput**](/container-registry-sdk-python/models/putregistryinput.md) |                               |       |

#### Return type

[**PutRegistryOutput**](/container-registry-sdk-python/models/putregistryoutput.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/container-registry-sdk-python/api/registriesapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
