Container Scanning

Upload a container image archive for scanning

Upload a container image tarball / OCI archive (for air-gapped images that cannot be pulled from a registry) in chunks, then enqueue a scan. Send chunks in chunkIndex order; chunk 0 returns a server-assigned fileId and the resolved repositoryId to echo on later chunks. On the final chunk the assembled archive is staged and the response carries the tracked containerImageId; poll containerImages.get on it (its queued flag and latestScan) to follow progress. If repositoryId is omitted, an ephemeral standalone repository is created/reused for the image.

post/api/v2/containerScans/uploadArchive

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring

Organization that owns the image. If omitted, resolved from auth context.

repositoryIdstring

Existing repository to attach the image to. If omitted, an ephemeral standalone repository is created/reused on the first chunk and returned for reuse on later chunks.

imageLabelstring required

Display name for the uploaded image; stored as the image reference.

chunkstring required

Base64-encoded slice of the archive file.

chunkIndexnumber required

Zero-based index of this chunk.

totalChunksnumber required

Total number of chunks in the upload.

fileIdstring

Server-assigned upload id from the first chunk’s response; required on every chunk after the first.

Response

Chunk accepted (and, on the final chunk, scan enqueued)

fileIdstring required

Upload id to pass on subsequent chunks.

repositoryIdstring required

Resolved repository id; pass it back on subsequent chunks.

containerImageIdstring nullable required

ID of the tracked container image whose scan was enqueued. Null until the final chunk; poll containerImages.get on it once set.

Changes

No recorded changes to this operation across all 1 revision of this API.