# Cancel async query (nodes)

Cancels an in-progress async node query. Once canceled, polling [GetQuerySpecNodesAsync](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getqueryspecnodesasync.md) for the same `query_result_id` returns `UNKNOWN` status and results are no longer retrievable.

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/v1/assessments/query\_spec:nodes\_async\_cancel" method="post" %}
[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 %}

### Request body

| Field             | Description                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `query_result_id` | The task ID returned by [CreateQuerySpecNodesAsync](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/createqueryspecnodesasync.md). |

```bash
curl -X POST "$BASE_URL/api/v1/assessments/query_spec:nodes_async_cancel" \
  -H "Authorization: Bearer $VEZA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query_result_id": "<query-result-id>"}'
```

A `200 OK` with an empty body indicates the cancellation was accepted. After cancellation, polling [GetQuerySpecNodesAsync](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getqueryspecnodesasync.md) for the same `query_result_id` returns `UNKNOWN` status and results are no longer retrievable.


---

# 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/cancelqueryspecnodesasync.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.
