Scan Data Export
get_scan_export(execution_id)
async
Get the specific scan data export execution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
execution_id |
int
|
The ID of the scan data export execution to get. |
required |
Returns:
Type | Description |
---|---|
ScanDataExportExecution
|
The scan data export execution. |
get_scan_exports()
async
Get a list of scan data export execution jobs for the current user.
Returns:
Type | Description |
---|---|
ScanDataExportExecutionList
|
A list of scan data export execution jobs for the current user. |
export_scan_data(criteria, scan_type='application/vnd.security.vulnerability.report; version=1.1')
async
Start an export scan data job for selected projects.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
criteria |
ScanDataExportRequest
|
The criteria to use for the scan data export. Unset fields are not considered for the criteria. Read the field descriptions carefully, because it is a HOT MESS! |
required |
scan_type |
str
|
The type of scan data to export. UNDOCUMENTED IN SPEC. Some info can be found here: https://goharbor.io/blog/harbor-2.6/#:~:text=Accessing%20CSV%20Export%20Programmatically. The default value should be sufficient for the main use case (exporting the vulnerability report). |
'application/vnd.security.vulnerability.report; version=1.1'
|
Returns:
Type | Description |
---|---|
ScanDataExportJob
|
The ID of the scan data export job. |
download_scan_export(execution_id)
async
Download the scan data export file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
execution_id |
int
|
The ID of the scan data export execution to download. |
required |
Returns:
Type | Description |
---|---|
FileResponse
|
The scan data export file. |