Skip to main content

job.get()

Retrieves the status and result of an asynchronous job.
result = client.job.get(job_id="your-job-id")

if result.status == "Completed":
    print(result.result)
elif result.status == "Failed":
    print(f"Job failed: {result.reason}")
else:
    print(f"Job status: {result.status}, progress: {result.progress}")

Parameters

job_id
string
required
The ID of the job to retrieve.

Response

JobGetResponse
AsyncJobResponse | EnhancedAsyncJobResponse
Returns the job status and result.

job.get_all()

Retrieves a paginated list of all jobs.
response = client.job.get_all(
    limit=50,
    cursor=None,
    exclude_configs=True
)

for job in response.jobs:
    print(f"Job {job.id}: {job.status}")

# Get next page
if response.next_cursor:
    next_page = client.job.get_all(cursor=response.next_cursor)

Parameters

cursor
string
Cursor for pagination. Use the next_cursor from the previous response to fetch the next page.
exclude_configs
boolean
Exclude raw_config from response to reduce size.
limit
integer
Maximum number of jobs to return per page. Defaults to 100, max 500.

Response

JobGetAllResponse
object
Returns a paginated list of jobs.
jobs
array
An array of job objects with their status and metadata.
next_cursor
string
Cursor to use for fetching the next page of results.

job.cancel()

Cancels a pending or in-progress job.
client.job.cancel(job_id="your-job-id")

Parameters

job_id
string
required
The ID of the job to cancel.

Response

response
object
Returns a success confirmation.