harbor_client.SysteminfoApi

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

MethodHTTP requestDescription
get_certGET /systeminfo/getcertGet default root certificate.
get_system_infoGET /systeminfoGet general system info
get_volumesGET /systeminfo/volumesGet system volume info (total/free size).

get_cert

Signature

get_cert(x_request_id: Optional[str])-> str

Get default root certificate.

This endpoint is for downloading a default root certificate.

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

try:
    # Get default root certificate.
    api_response = api_instance.get_cert(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SysteminfoApi->get_cert: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

str

Authorization

basic

HTTP request headers

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

[Back to top]

get_system_info

Signature

get_system_info(x_request_id: Optional[str])-> GeneralInfo

Get general system info

This API is for retrieving general system info, this can be called by anonymous request. Some attributes will be omitted in the response when this API is called by anonymous request.

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

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

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

GeneralInfo

Authorization

basic

HTTP request headers

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

[Back to top]

get_volumes

Signature

get_volumes(x_request_id: Optional[str])-> SystemInfo

Get system volume info (total/free size).

This endpoint is for retrieving system volume info that only provides for admin user. Note that the response only reflects the storage status of local disk.

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

try:
    # Get system volume info (total/free size).
    api_response = api_instance.get_volumes(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SysteminfoApi->get_volumes: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

SystemInfo

Authorization

basic

HTTP request headers

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

[Back to top]