List scan artifacts with presigned download URLs
Lists artifacts of the selected scan, or the latest successful default-branch scan of the requested scanType. Each artifact includes a fresh presignedUrl, valid for 15 minutes. An artifact whose file is missing from S3 has an empty presignedUrl. An explicit scanUuid must belong to this repository and takes precedence over scanType.
Request
GET
https://appsec.sourcecraft.tech/v1/artifacts
Query parameters
|
Name |
Description |
|
gitRepo |
Type: string Repository identifier. Accepts either internal repository ID (e.g., 88769874964302633) or public UUID (e.g., 0199140f-4343-7c06-a7e3-b835c305b629). These values can be obtained from the getRepo API (fields: id and uuid). Pattern: Example: |
|
pageSize |
Type: integer Page size, from 1 to 250. Default: 50. Default: Min value: Max value: |
|
pageToken |
Type: string Omit for the first page. Use nextPageToken from the response for subsequent pages, keeping all other parameters unchanged. An empty nextPageToken means the last page. Default: `` Example: `` |
|
scanType |
Type: string Latest-scan selection: SCAN_TYPE_DEFAULT (default), SCAN_TYPE_AUDIT or SCAN_TYPE_CLOUD_DAST. Default: `` Example: `` |
|
scanUuid |
Type: string Scan UUID to select. Omit or leave blank to use the repository's latest scan. Scan UUIDs can be obtained from the scan listing endpoints. Default: `` Example: |
|
type |
Type: string Engine type: UNSPECIFIED (all), SECRETS, SCA, SAST, SBOM_SPDX, SBOM_CYCLONEDX, DAST or AI_AUDIT. Default: `` Example: `` |
Responses
200 OK
OK
Body
application/json
{
"data": [
{
"artifactKey": "example",
"presignedUrl": "example",
"engineName": "example",
"engineType": "example"
}
],
"nextPageToken": "example",
"totalSize": 0,
"listRevision": "example"
}
|
Name |
Description |
|
data |
Type: ArtifactDownloadDto[] Example
|
|
nextPageToken |
Type: string Example: |
|
totalSize |
Type: integer |
|
listRevision |
Type: string | null Example: |
ArtifactDownloadDto
|
Name |
Description |
|
artifactKey |
Type: string Example: |
|
engineName |
Type: string Example: |
|
engineType |
Type: string Example: |
|
presignedUrl |
Type: string Example: |
Example
{
"artifactKey": "example",
"presignedUrl": "example",
"engineName": "example",
"engineType": "example"
}