Threads API
Get the saved result
Read the manifest of the thread's latest saved result.
/api/v1/tasks/{taskId}/resultA saved result is the workspace as it was last saved: the repository and a patch from the commit the thread started on. The manifest says when it was saved and where to download it. It is not a live view of the workspace; unsaved changes are not in it.
Requires a personal API token with the tasks:read scope, sent as Authorization: Bearer over HTTPS.
Path parameters
taskIdstring (UUID)requiredThe thread. A thread that is not yours answers 404, never 403.
Returns
200 OK with the result manifest.
Response fields
version1requiredPayload version.
taskobjectrequiredtaskId,titleandstatuswhen the result was read.sourceobjectrequiredWhere the thread started:
kind(artifacts,githubortask),repository,ref,commitandbranch.resultobjectrequiredThe saved result itself.
result.backupIdstring (UUID)requiredIdentifies this saved result.
result.savedAtstring (ISO 8601)requiredWhen it was saved.
result.baseCommitstringrequiredThe commit the thread started from.
result.headCommitstringrequiredThe saved commit.
result.branchstringrequiredA branch name for the result,
statefold/result-and 8 hex digits.result.archiveBytesintegerrequiredArchive size in bytes, up to 4 GiB.
result.archivePathstringrequiredPath of the archive on the same origin. Download it with the same token.
result.repositoryPath"repo"requiredDirectory in the archive that holds the repository.
result.patchPath"changes.patch"requiredFile in the archive with the changes from
baseCommit.
Errors
Errors are JSON: { "version": 1, "error": { "code", "message" } }. See Errors for retry advice.
- 400
invalid_request The thread id is not a UUID.
- 401
unauthorized The bearer token is missing, invalid or revoked.
- 403
forbidden The token does not have the
tasks:readscope, or the account is suspended.- 404
not_found The thread is not yours, or it has no saved result yet.
- 503
unavailable The result could not be read or is larger than the archive limit.