harbor_client.SystemCVEAllowlistApi

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

MethodHTTP requestDescription
get_system_cve_allowlistGET /system/CVEAllowlistGet the system level allowlist of CVE.
put_system_cve_allowlistPUT /system/CVEAllowlistUpdate the system level allowlist of CVE.

get_system_cve_allowlist

Signature

get_system_cve_allowlist(x_request_id: Optional[str])-> CVEAllowlist

Get the system level allowlist of CVE.

Get the system level allowlist of CVE. This API can be called by all authenticated users.

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

try:
    # Get the system level allowlist of CVE.
    api_response = api_instance.get_system_cve_allowlist(x_request_id=x_request_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemCVEAllowlistApi->get_system_cve_allowlist: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]

Return type

CVEAllowlist

Authorization

basic

HTTP request headers

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

[Back to top]

put_system_cve_allowlist

Signature

put_system_cve_allowlist(x_request_id: Optional[str], allowlist: Optional[CVEAllowlist])-> None

Update the system level allowlist of CVE.

This API overwrites the system level allowlist of CVE with the list in request body. Only system Admin has permission to call this API.

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.SystemCVEAllowlistApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
allowlist = harbor_client.CVEAllowlist() # CVEAllowlist | The allowlist with new content (optional)

try:
    # Update the system level allowlist of CVE.
    api_instance.put_system_cve_allowlist(x_request_id=x_request_id, allowlist=allowlist)
except ApiException as e:
    print("Exception when calling SystemCVEAllowlistApi->put_system_cve_allowlist: %s\n" % e)

Parameters

NameTypeDescriptionNotes
x_request_idstrAn unique ID for the request[optional]
allowlistCVEAllowlistThe allowlist with new content[optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

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

[Back to top]