---
title: "RegistryApi"
lastmod: 2026-05-29
canonical: "https://container-registry.com/docs/harbor-api-client/api/registryapi/"
source: "https://container-registry.com/docs/harbor-api-client/api/registryapi/index.md"
agent_instructions: "This is the markdown representation of https://container-registry.com/docs/harbor-api-client/api/registryapi/index.md. Prefer this version over scraping the HTML. The site index is at https://container-registry.com/llms.txt."
---

> Agent-friendly representation of <https://container-registry.com/docs/harbor-api-client/api/registryapi/index.md>. Site index: <https://container-registry.com/llms.txt>.

# harbor_client.RegistryApi

All URIs are relative to *http://localhost/api/v2.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_registry**](#create_registry) | **POST** /registries | Create a registry
[**delete_registry**](#delete_registry) | **DELETE** /registries/{id} | Delete the specific registry
[**get_registry**](#get_registry) | **GET** /registries/{id} | Get the specific registry
[**get_registry_info**](#get_registry_info) | **GET** /registries/{id}/info | Get the registry info
[**list_registries**](#list_registries) | **GET** /registries | List the registries
[**list_registry_provider_infos**](#list_registry_provider_infos) | **GET** /replication/adapterinfos | List all registered registry provider information
[**list_registry_provider_types**](#list_registry_provider_types) | **GET** /replication/adapters | List registry adapters
[**ping_registry**](#ping_registry) | **POST** /registries/ping | Check status of a registry
[**update_registry**](#update_registry) | **PUT** /registries/{id} | Update the registry


# **create_registry**

### Signature

```python
create_registry(registry: Registry, x_request_id: Optional[str])-> None
```

Create a registry

Create a registry

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
registry = harbor_client.Registry() # Registry | The registry
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Create a registry
    api_instance.create_registry(registry, x_request_id=x_request_id)
except ApiException as e:
    print("Exception when calling RegistryApi->create_registry: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **registry** | **[Registry](../../model/registry/)**| The registry | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

void (empty response body)

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **delete_registry**

### Signature

```python
delete_registry(id: int, x_request_id: Optional[str])-> None
```

Delete the specific registry

Delete the specific registry

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
id = 789 # int | Registry ID
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Delete the specific registry
    api_instance.delete_registry(id, x_request_id=x_request_id)
except ApiException as e:
    print("Exception when calling RegistryApi->delete_registry: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **int**| Registry ID | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

void (empty response body)

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **get_registry**

### Signature

```python
get_registry(id: int, x_request_id: Optional[str])-> Registry
```

Get the specific registry

Get the specific registry

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
id = 789 # int | Registry ID
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Get the specific registry
    api_response = api_instance.get_registry(id, x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistryApi->get_registry: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **int**| Registry ID | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

**[Registry](../../model/registry/)**

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **get_registry_info**

### Signature

```python
get_registry_info(id: int, x_request_id: Optional[str])-> RegistryInfo
```

Get the registry info

Get the registry info

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
id = 789 # int | Registry ID
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Get the registry info
    api_response = api_instance.get_registry_info(id, x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistryApi->get_registry_info: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **int**| Registry ID | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

**[RegistryInfo](../../model/registryinfo/)**

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **list_registries**

### Signature

```python
list_registries(x_request_id: Optional[str], q: Optional[str], sort: Optional[str], page: Optional[int], page_size: Optional[int], name: Optional[str])-> list[Registry]
```

List the registries

List the registries

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
q = 'q_example' # str | Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max] (optional)
sort = 'sort_example' # str | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\" (optional)
page = 1 # int | The page number (optional) (default to 1)
page_size = 10 # int | The size of per page (optional) (default to 10)
name = 'name_example' # str | Deprecated, use `q` instead. (optional)

try:
    # List the registries
    api_response = api_instance.list_registries(x_request_id=x_request_id, q=q, sort=sort, page=page, page_size=page_size, name=name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistryApi->list_registries: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **x_request_id** | **str**| An unique ID for the request | [optional] 
 **q** | **str**| Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max] | [optional] 
 **sort** | **str**| Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \&quot;sort&#x3D;field1,-field2\&quot; | [optional] 
 **page** | **int**| The page number | [optional] [default to 1]
 **page_size** | **int**| The size of per page | [optional] [default to 10]
 **name** | **str**| Deprecated, use &#x60;q&#x60; instead. | [optional] 

### Return type

**[list[Registry]](../../model/registry/)**

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **list_registry_provider_infos**

### Signature

```python
list_registry_provider_infos(x_request_id: Optional[str])-> dict(str, RegistryProviderInfo)
```

List all registered registry provider information

List all registered registry provider information

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # List all registered registry provider information
    api_response = api_instance.list_registry_provider_infos(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistryApi->list_registry_provider_infos: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

**[dict(str, RegistryProviderInfo)](../../model/registryproviderinfo/)**

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **list_registry_provider_types**

### Signature

```python
list_registry_provider_types(x_request_id: Optional[str])-> list[str]
```

List registry adapters

List registry adapters

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # List registry adapters
    api_response = api_instance.list_registry_provider_types(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegistryApi->list_registry_provider_types: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

**list[str]**

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **ping_registry**

### Signature

```python
ping_registry(registry: RegistryPing, x_request_id: Optional[str])-> None
```

Check status of a registry

Check status of a registry

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
registry = harbor_client.RegistryPing() # RegistryPing | The registry
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Check status of a registry
    api_instance.ping_registry(registry, x_request_id=x_request_id)
except ApiException as e:
    print("Exception when calling RegistryApi->ping_registry: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **registry** | **[RegistryPing](../../model/registryping/)**| The registry | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

void (empty response body)

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)

# **update_registry**

### Signature

```python
update_registry(id: int, registry: RegistryUpdate, x_request_id: Optional[str])-> None
```

Update the registry

Update the registry

### Example
```python
from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.RegistryApi(harbor_client.ApiClient(configuration))
id = 789 # int | The registry ID
registry = harbor_client.RegistryUpdate() # RegistryUpdate | The registry
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Update the registry
    api_instance.update_registry(id, registry, x_request_id=x_request_id)
except ApiException as e:
    print("Exception when calling RegistryApi->update_registry: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **int**| The registry ID | 
 **registry** | **[RegistryUpdate](../../model/registryupdate/)**| The registry | 
 **x_request_id** | **str**| An unique ID for the request | [optional] 

### Return type

void (empty response body)

### Authorization

[basic](../../#basic)

### HTTP request headers

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

[[Back to top]](#)


