Skip to content
StatefoldDocsChangelogOpen app

Threads API

Download the result archive

Download the saved result as a gzipped tar archive.

GET/api/v1/tasks/{taskId}/result/{backupId}/archive

Use the archivePath from Get the saved result rather than building the path yourself. If the thread saved a newer result since you read the manifest, the download answers 409: read the manifest again and download the new path.

Requires a personal API token with the tasks:read scope, sent as Authorization: Bearer over HTTPS.

Path parameters

taskIdstring (UUID)required

The thread. A thread that is not yours answers 404, never 403.

backupIdstring (UUID)required

result.backupId from the manifest.

Returns

200 OK with application/gzip, saved as statefold-result.tar.gz. It holds repo/ and changes.patch.

Errors

Errors are JSON: { "version": 1, "error": { "code", "message" } }. See Errors for retry advice.

400invalid_request

The thread id is not a UUID.

401unauthorized

The bearer token is missing, invalid or revoked.

403forbidden

The token does not have the tasks:read scope, or the account is suspended.

404not_found

The thread is not yours, or it has no saved result.

409conflict

A newer result was saved. Fetch the manifest again.

503unavailable

The archive is missing, incomplete or over the 4 GiB limit.