Jobs

Long-running operations. An endpoint that works in the background answers 202 Accepted with a job and a Location header; poll GET /v1/jobs/{id} until the status is JOB_STATUS_SUCCEEDED or JOB_STATUS_FAILED. Jobs can be read for 24 hours after they finish.

#The Job Error object

Why a job failed.

codeType

string

Stable error code, the same codeType a synchronous call would return.

message

string

Human-readable explanation.

GET
/v1/jobs/{id}
Requires auth

#Get a job

Returns the status of a long-running operation and, once it succeeded, its result. Poll this until the status is JOB_STATUS_SUCCEEDED or JOB_STATUS_FAILED. Requires the `links:read` scope.

#Parameters

path parameters

id

string
Required
path

The job ID returned when the job was accepted.

#Response

200

Everything worked as expected.

completedAt

string (date-time)

When the job finished, once it has.

createdAt

string (date-time)

When the job was accepted.

error

object

Why a job failed.

id

string

Job ID (UUID).

itemCount

integer (int32)

How many items the job was submitted with.

linksBulkCreate

object

Result of a JOB_TYPE_LINKS_BULK_CREATE job.

status

string (enum)

Where a job stands.

Allowed values
JOB_STATUS_UNSPECIFIED

Not set.

JOB_STATUS_PENDING

Accepted and waiting to run.

JOB_STATUS_RUNNING

Running now.

JOB_STATUS_SUCCEEDED

Finished; the result is set.

JOB_STATUS_FAILED

Finished without doing its work; error says why. Nothing was created.

statusUrl

string

Path to poll for this job's status.

type

string (enum)

What a job does.

Allowed values
JOB_TYPE_UNSPECIFIED

Not set.

JOB_TYPE_LINKS_BULK_CREATE

Creates a batch of links (POST /v1/links/bulk/jobs).

#Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object
Required

Wrapped error response.