Request archive upload
Returns a signed URL for uploading a .zip, .7z, or .tar.gz source archive, for code that isn’t in a connected repository. You need the member role or above.
- Call this endpoint with the archive’s
file_name. PUTthe file toupload_url, with theContent-Typeheader set to the returnedcontent_type.- Add
{ "source": "upload", "archive_id": "<id>" }toreposwhen you create a pentest draft withPOST /pentests.
To pentest part of the archive, set include_paths or exclude_paths on its entry in repos. You can use the same uploaded archive.
Note
Some self-hosted deployments return 400 because they don’t support API uploads. In that case, upload the archive through the Hacktron web app.
Request
POST /archives/uploads
Send an API key with the write scope in the X-Api-Key header.
Body
A required application/json body.
| Field | Description |
|---|---|
file_namestring, required | Original filename (e.g. "my-project.zip"). |
namestring | Display name (defaults to filename). |
Responses
201 Created
| Field | Description |
|---|---|
idstring, required | Archive ID. |
upload_urlstring, required | Signed GCS upload URL (PUT). |
content_typestring, required | Content-Type to use in the PUT request. |