harbor_client.ConfigureApi

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

MethodHTTP requestDescription
get_configurationsGET /configurationsGet system configurations.
get_internalconfigGET /internalconfigGet internal configurations.
update_configurationsPUT /configurationsModify system configurations.

get_configurations

Signature

get_configurations(x_request_id: Optional[str])-> ConfigurationsResponse

Get system configurations.

This endpoint is for retrieving system configurations that only provides for admin user.

Example

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.ConfigureApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Get system configurations.
    api_response = api_instance.get_configurations(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigureApi->get_configurations: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

ConfigurationsResponse

Authorization

basic

HTTP request headers

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

[Back to top]

get_internalconfig

Signature

get_internalconfig(x_request_id: Optional[str])-> InternalConfigurationsResponse

Get internal configurations.

This endpoint is for retrieving system configurations that only provides for internal api call.

Example

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.ConfigureApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Get internal configurations.
    api_response = api_instance.get_internalconfig(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConfigureApi->get_internalconfig: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

InternalConfigurationsResponse

Authorization

basic

HTTP request headers

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

[Back to top]

update_configurations

Signature

update_configurations(configurations: Configurations, x_request_id: Optional[str])-> None

Modify system configurations.

This endpoint is for modifying system configurations that only provides for admin user.

Example

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.ConfigureApi(harbor_client.ApiClient(configuration))
configurations = harbor_client.Configurations() # Configurations | The configuration map can contain a subset of the attributes of the schema, which are to be updated.
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)

try:
    # Modify system configurations.
    api_instance.update_configurations(configurations, x_request_id=x_request_id)
except ApiException as e:
    print("Exception when calling ConfigureApi->update_configurations: %s\n" % e)

Parameters

NameTypeDescriptionNotes
configurationsConfigurationsThe configuration map can contain a subset of the attributes of the schema, which are to be updated.
x_request_idstrAn unique ID for the request[optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

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

[Back to top]