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, opts)
Create a registry
Create a registry
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
registry = Harbor2Client::Registry.new # Registry | The registry
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Create a registry
api_instance.create_registry(registry, opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->create_registry: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
registry | Registry | The registry | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
delete_registry(id, opts)
Delete the specific registry
Delete the specific registry
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
id = 789 # Integer | Registry ID
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Delete the specific registry
api_instance.delete_registry(id, opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->delete_registry: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Registry ID | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
Registry get_registry(id, opts)
Get the specific registry
Get the specific registry
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
id = 789 # Integer | Registry ID
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Get the specific registry
result = api_instance.get_registry(id, opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->get_registry: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Registry ID | |
x_request_id | String | An unique ID for the request | [optional] |
- Content-Type: application/json
- Accept: application/json
RegistryInfo get_registry_info(id, opts)
Get the registry info
Get the registry info
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
id = 789 # Integer | Registry ID
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Get the registry info
result = api_instance.get_registry_info(id, opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->get_registry_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Registry ID | |
x_request_id | String | An unique ID for the request | [optional] |
- Content-Type: application/json
- Accept: application/json
Array<Registry> list_registries(opts)
List the registries
List the registries
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
q: 'q_example', # String | 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]
sort: 'sort_example', # String | 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\"
page: 1, # Integer | The page number
page_size: 10, # Integer | The size of per page
name: 'name_example' # String | Deprecated, use `q` instead.
}
begin
#List the registries
result = api_instance.list_registries(opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->list_registries: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | String | An unique ID for the request | [optional] |
q | String | Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k= |
[optional] |
sort | String | 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 | Integer | The page number | [optional] [default to 1] |
page_size | Integer | The size of per page | [optional] [default to 10] |
name | String | Deprecated, use `q` instead. | [optional] |
- Content-Type: application/json
- Accept: application/json
Hash<String, RegistryProviderInfo> list_registry_provider_infos(opts)
List all registered registry provider information
List all registered registry provider information
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#List all registered registry provider information
result = api_instance.list_registry_provider_infos(opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->list_registry_provider_infos: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | String | An unique ID for the request | [optional] |
Hash<String, RegistryProviderInfo>
- Content-Type: application/json
- Accept: application/json
Array<String> list_registry_provider_types(opts)
List registry adapters
List registry adapters
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#List registry adapters
result = api_instance.list_registry_provider_types(opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->list_registry_provider_types: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | String | An unique ID for the request | [optional] |
Array<String>
- Content-Type: application/json
- Accept: application/json
ping_registry(registry, opts)
Check status of a registry
Check status of a registry
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
registry = Harbor2Client::RegistryPing.new # RegistryPing | The registry
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Check status of a registry
api_instance.ping_registry(registry, opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->ping_registry: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
registry | RegistryPing | The registry | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
update_registry(id, registry, opts)
Update the registry
Update the registry
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Harbor2Client::RegistryApi.new
id = 789 # Integer | The registry ID
registry = Harbor2Client::RegistryUpdate.new # RegistryUpdate | The registry
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Update the registry
api_instance.update_registry(id, registry, opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RegistryApi->update_registry: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The registry ID | |
registry | RegistryUpdate | The registry | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json