Skip to content

Get a job

GET
/v1/jobs/{id}
curl -H "X-Api-Key: $KEY" "http://localhost:9027/v1/jobs/$JOB"

Where a background job is. Ask again until status is done or failed; Retry-After says how soon. A job and its result are kept for RUSTICDOC_JOB_TTL after it ends, then removed.

id
required
string

The job’s id, from the 202’s body or Location

The job

Media typeapplication/json

A background job.

object
createdAt
required

RFC 3339, to the millisecond.

string
error

Present once it failed: what the request would have answered, as error, message and status.

object | null
expiresAt

When the job and its result are removed.

string | null
finishedAt
string | null
id
required
string
requestId
required

The X-Request-Id of the request that started it.

string
result
One of:

Present once it is done; download it from /v1/jobs/{id}/result.

object
contentType
required
string
name
required
string
sha256
required

Hex SHA-256 of the content.

string
size
required
integer format: int64
runsUntil
required

A job that has not ended by then is reported as failed with job_lost: the container running it stopped.

string
startedAt
string | null
status
required

queued, running, done or failed.

string

Example

{
"id": "01966f3e-7c1a-7d3c-9a44-1d2f5a6b7c8d",
"result": {
"contentType": "application/pdf",
"name": "invoice.pdf"
},
"status": "done"
}

This caller has no such job, or it expired

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

RUSTICDOC_STORE is not set

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

The store cannot be reached

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}