All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
create_registry | POST /registries | Create a registry |
delete_registry | DELETE /registries/{id} | Delete the specific registry |
get_registry | GET /registries/{id} | Get the specific registry |
get_registry_info | GET /registries/{id}/info | Get the registry info |
list_registries | GET /registries | List the registries |
list_registry_provider_infos | GET /replication/adapterinfos | List all registered registry provider information |
list_registry_provider_types | GET /replication/adapters | List registry adapters |
ping_registry | POST /registries/ping | Check status of a registry |
update_registry | PUT /registries/{id} | Update the registry |
create_registry(registry: Registry, x_request_id: Optional[str])-> None
Create a registry
Create a registry
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)
Name | Type | Description | Notes |
---|---|---|---|
registry | Registry | The registry | |
x_request_id | str | An unique ID for the request | [optional] |
void (empty response body)
delete_registry(id: int, x_request_id: Optional[str])-> None
Delete the specific registry
Delete the specific registry
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)
Name | Type | Description | Notes |
---|---|---|---|
id | int | Registry ID | |
x_request_id | str | An unique ID for the request | [optional] |
void (empty response body)
get_registry(id: int, x_request_id: Optional[str])-> Registry
Get the specific registry
Get the specific registry
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)
Name | Type | Description | Notes |
---|---|---|---|
id | int | Registry ID | |
x_request_id | str | An unique ID for the request | [optional] |
get_registry_info(id: int, x_request_id: Optional[str])-> RegistryInfo
Get the registry info
Get the registry info
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)
Name | Type | Description | Notes |
---|---|---|---|
id | int | Registry ID | |
x_request_id | str | An unique ID for the request | [optional] |
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
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)
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 "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 | 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 | int | The page number | [optional] [default to 1] |
page_size | int | The size of per page | [optional] [default to 10] |
name | str | Deprecated, use `q` instead. | [optional] |
list_registry_provider_infos(x_request_id: Optional[str])-> dict(str, RegistryProviderInfo)
List all registered registry provider information
List all registered registry provider information
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)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | An unique ID for the request | [optional] |
dict(str, RegistryProviderInfo)
list_registry_provider_types(x_request_id: Optional[str])-> list[str]
List registry adapters
List registry adapters
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)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | An unique ID for the request | [optional] |
list[str]
ping_registry(registry: RegistryPing, x_request_id: Optional[str])-> None
Check status of a registry
Check status of a registry
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)
Name | Type | Description | Notes |
---|---|---|---|
registry | RegistryPing | The registry | |
x_request_id | str | An unique ID for the request | [optional] |
void (empty response body)
update_registry(id: int, registry: RegistryUpdate, x_request_id: Optional[str])-> None
Update the registry
Update the registry
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)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The registry ID | |
registry | RegistryUpdate | The registry | |
x_request_id | str | An unique ID for the request | [optional] |
void (empty response body)