# Get async task status

Fetches the current status and result of a generic async task by ID.

Use this endpoint to poll async operations that return a `job_id` or task ID (for example, `SyncRisksOwnerFromGraphAsync` or `EvaluateReportAsync`).

For typed query results from [Create async query from query spec (nodes)](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/createqueryspecnodesasync.md), use [Get async query results (nodes)](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getqueryspecnodesasync.md) instead.

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/v1/assessments/async\_tasks/{id}" method="get" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-f5344805587160cf141bde637e04e03e2aa86778%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Path parameter

| Parameter | Description                                                    |
| --------- | -------------------------------------------------------------- |
| `id`      | The async task ID returned by the originating async operation. |

### Polling workflow

1. Submit an async operation (e.g., [Get query spec results async](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getassessmentqueryspecresultasync.md)).
2. Copy the `task.id` from the response.
3. Poll `GET /api/v1/assessments/async_tasks/{id}` until `state` = `"COMPLETE"`.
4. Check `status` to determine the outcome.

### AsyncTask state and status values

The API returns string enum names in JSON responses. The numeric values are shown for reference only.

**State** (task lifecycle):

| Value | Name            | Description               |
| ----- | --------------- | ------------------------- |
| 0     | `UNKNOWN_STATE` | Default/unset             |
| 1     | `PENDING`       | Queued, not yet started   |
| 2     | `IN_PROGRESS`   | Executing                 |
| 3     | `COMPLETE`      | Finished (check `status`) |

**Status** (outcome when complete):

| Value | Name             | Description                           |
| ----- | ---------------- | ------------------------------------- |
| 0     | `UNKNOWN_STATUS` | Default/unset                         |
| 1     | `SUCCEEDED`      | Result available in `result` field    |
| 2     | `FAILED`         | See `error_reason` and `error_status` |
| 3     | `CANCELED`       | Task was canceled before completion   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getassessmentasynctask.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
