Skip to content
Hacktron Sign in [S]

Request archive upload

Coming soon 1 min Coming soon , , , , ,

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.

  1. Call this endpoint with the archive’s file_name.

  2. PUT the file to upload_url, with the Content-Type header set to the returned content_type.

  3. Add { "source": "upload", "archive_id": "<id>" } to repos when you create a pentest draft with POST /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_name
string, required
Original filename (e.g. "my-project.zip").
name
string
Display name (defaults to filename).

Responses

201 Created

Field Description
id
string, required
Archive ID.
upload_url
string, required
Signed GCS upload URL (PUT).
content_type
string, required
Content-Type to use in the PUT request.
Menu
[M]
Next in menu
[J]
Previous in menu
[K]
Find
[F]
Sign in
[S]
Copy page
[C]
Justification
[R]
Dark mode
[D]
High contrast
[H]
Shortcuts
[I]
Close
[esc]