All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
download_scan_data | GET /export/cve/download/{execution_id} | Download the scan data export file |
export_scan_data | POST /export/cve | Export scan data for selected projects |
get_scan_data_export_execution | GET /export/cve/execution/{execution_id} | Get the specific scan data export execution |
get_scan_data_export_execution_list | GET /export/cve/executions | Get a list of specific scan data export execution jobs for a specified user |
download_scan_data(execution_id: int, x_request_id: Optional[str], format: Optional[str])-> str
Download the scan data export file
Download the scan data report. Default format is CSV
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.ScanDataExportApi(harbor_client.ApiClient(configuration))
execution_id = 56 # int | Execution ID
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
format = 'format_example' # str | The format of the data to be exported. e.g. CSV or PDF (optional)
try:
# Download the scan data export file
api_response = api_instance.download_scan_data(execution_id, x_request_id=x_request_id, format=format)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanDataExportApi->download_scan_data: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
execution_id | int | Execution ID | |
x_request_id | str | An unique ID for the request | [optional] |
format | str | The format of the data to be exported. e.g. CSV or PDF | [optional] |
str
export_scan_data(x_scan_data_type: str, criteria: ScanDataExportRequest, x_request_id: Optional[str])-> ScanDataExportJob
Export scan data for selected projects
Export scan data for selected projects
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.ScanDataExportApi(harbor_client.ApiClient(configuration))
x_scan_data_type = 'x_scan_data_type_example' # str | The type of scan data to export
criteria = harbor_client.ScanDataExportRequest() # ScanDataExportRequest | The criteria for the export
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
try:
# Export scan data for selected projects
api_response = api_instance.export_scan_data(x_scan_data_type, criteria, x_request_id=x_request_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanDataExportApi->export_scan_data: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_scan_data_type | str | The type of scan data to export | |
criteria | ScanDataExportRequest | The criteria for the export | |
x_request_id | str | An unique ID for the request | [optional] |
get_scan_data_export_execution(execution_id: int, x_request_id: Optional[str])-> ScanDataExportExecution
Get the specific scan data export execution
Get the scan data export execution specified by ID
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.ScanDataExportApi(harbor_client.ApiClient(configuration))
execution_id = 56 # int | Execution ID
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
try:
# Get the specific scan data export execution
api_response = api_instance.get_scan_data_export_execution(execution_id, x_request_id=x_request_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanDataExportApi->get_scan_data_export_execution: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
execution_id | int | Execution ID | |
x_request_id | str | An unique ID for the request | [optional] |
get_scan_data_export_execution_list(x_request_id: Optional[str])-> ScanDataExportExecutionList
Get a list of specific scan data export execution jobs for a specified user
Get a list of specific scan data export execution jobs for a specified user
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.ScanDataExportApi(harbor_client.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
try:
# Get a list of specific scan data export execution jobs for a specified user
api_response = api_instance.get_scan_data_export_execution_list(x_request_id=x_request_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanDataExportApi->get_scan_data_export_execution_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | An unique ID for the request | [optional] |