All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
delete_repository | DELETE /projects/{project_name}/repositories/{repository_name} | Delete repository |
get_repository | GET /projects/{project_name}/repositories/{repository_name} | Get repository |
list_all_repositories | GET /repositories | List all authorized repositories |
list_repositories | GET /projects/{project_name}/repositories | List repositories |
update_repository | PUT /projects/{project_name}/repositories/{repository_name} | Update repository |
delete_repository(project_namerepository_name, , opts)
Delete repository
Delete the repository specified by name
# 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::RepositoryApi.new
project_name = 'project_name_example' # String | The name of the project
repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Delete repository
api_instance.delete_repository(project_namerepository_name, , opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RepositoryApi->delete_repository: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_name | String | The name of the project | |
repository_name | String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
Repository get_repository(project_namerepository_name, , opts)
Get repository
Get the repository specified by name
# 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::RepositoryApi.new
project_name = 'project_name_example' # String | The name of the project
repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Get repository
result = api_instance.get_repository(project_namerepository_name, , opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RepositoryApi->get_repository: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_name | String | The name of the project | |
repository_name | String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb | |
x_request_id | String | An unique ID for the request | [optional] |
- Content-Type: application/json
- Accept: application/json
Array<Repository> list_all_repositories(opts)
List all authorized repositories
List all authorized repositories
# 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::RepositoryApi.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
}
begin
#List all authorized repositories
result = api_instance.list_all_repositories(opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RepositoryApi->list_all_repositories: #{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] |
- Content-Type: application/json
- Accept: application/json
Array<Repository> list_repositories(project_name, opts)
List repositories
List repositories of the specified project
# 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::RepositoryApi.new
project_name = 'project_name_example' # String | The name of the project
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
}
begin
#List repositories
result = api_instance.list_repositories(project_name, opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling RepositoryApi->list_repositories: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_name | String | The name of the project | |
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] |
- Content-Type: application/json
- Accept: application/json
update_repository(project_namerepository_name, repository, opts)
Update repository
Update the repository specified by name
# 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::RepositoryApi.new
project_name = 'project_name_example' # String | The name of the project
repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
repository = Harbor2Client::Repository.new # Repository | The JSON object of repository.
opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
}
begin
#Update repository
api_instance.update_repository(project_namerepository_name, repository, opts)
rescue Harbor2Client::ApiError => e
puts "Exception when calling RepositoryApi->update_repository: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_name | String | The name of the project | |
repository_name | String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb | |
repository | Repository | The JSON object of repository. | |
x_request_id | String | An unique ID for the request | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json