---
title: "Query Asynchronous Jobs"
method: GET
path: "/async-jobs"
tags: ["AsynchronousJob"]
---

# Query Asynchronous Jobs

`GET /async-jobs`

Queries Jobs

## Query parameters

- `workspace_id` string, required
- `status` 'pending' | 'running' | 'completed' | 'failed'
- `job_type` 'xray_sync' | 'workspace_copy'
- `associated_entities` AsynchronousJobAssociatedEntity[]
  - `type` 'workspace' | 'plan_run' — Type of Entity this AsynchronousJob is associated with
  - `id` string — Unique identifier for the associated Entity
- `limit` integer
- `cursor` string

## Response `200`

The query result

- AsynchronousJobQueryResult
  - `jobs` AsynchronousJob[] — All AsynchronousJobs that match query
    - `id` string — Unique identifier of the TestCase
    - `workspace_id` string — Unique identifier for the associated Workspace
    - `job_type` 'xray_sync' | 'workspace_copy' — Type of AsynchronousJob
    - `status` 'pending' | 'running' | 'completed' | 'failed' — Current status of the AsynchronousJob
    - `associated_entities` AsynchronousJobAssociatedEntity[] — Type of Entity this AsynchronousJob is associated with
      - `type` 'workspace' | 'plan_run' — Type of Entity this AsynchronousJob is associated with
      - `id` string — Unique identifier for the associated Entity
    - `created_time` integer — Time the AsynchronousJob was created
    - `created_by_id` string — Identifier of the user who created the AsynchronousJob
    - `last_updated_time` integer — Time the AsynchronousJob was last updated
    - `last_updated_by_id` string — Identifier of the user who last updated the AsynchronousJob
    - `error_message` string — If failed, an optional error message associated with the failure
    - `job_source` 'test_run' | 'plan_run' — What triggered this job
  - `cursor` string — Pagination cursor

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
