Scans

Upload and Scan

Uploads repository content in chunks and initiates a scan. Use this endpoint multiple times to upload large repositories:

  1. First request: Send without fileId, with chunkIndex=0
  2. Subsequent requests: Include the fileId returned from the first request
  3. Final request: Set chunkIndex to totalChunks-1

The scan will start automatically after the final chunk is received.

post/api/v1/scans/upload-and-scan

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 ID the repository belongs to

repositoryIdstring required

ID of the repository to scan

chunkstring required

Base64 encoded content chunk of the repository

chunkIndexnumber required

Index of this chunk in the total set

totalChunksnumber required

Total number of chunks for this scan

fileIdstring

File ID returned from the first chunk upload. Do not include for the first request (when chunkIndex is 0)

Response

Chunk uploaded successfully. If this was the final chunk, scan is also started.

fileIdstring required

File ID to use for subsequent chunk uploads

scanIdstring

ID of the created scan. Only returned after the final chunk is uploaded

Changes

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