# Create async query nodes

Asynchronously execute a saved assessment query by ID and return node-level results.

This is the async equivalent of [Get query nodes](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getassessmentquerynodes.md), for saved queries that may return large result sets or take longer than the synchronous request timeout allows.

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/v1/assessments/queries/{id}:nodes\_async\_create" 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 %}

### Path parameter

| Parameter | Description                                    |
| --------- | ---------------------------------------------- |
| `id`      | The ID of a saved assessment query to execute. |

### Request options

| Field                                     | Description                                                 |
| ----------------------------------------- | ----------------------------------------------------------- |
| `snapshot_id`                             | Query against a specific point-in-time data snapshot.       |
| `properties_to_get`                       | Limit which properties are returned on source nodes.        |
| `include_all_source_tags_in_results`      | Include tags in source node results.                        |
| `include_all_destination_tags_in_results` | Include tags in destination node results.                   |
| `fetch_cached_results`                    | Return cached results if available.                         |
| `include_approx_total_source_nodes_count` | Include approximate total source node count.                |
| `page_size` / `page_token`                | Control pagination of results.                              |
| `order_by`                                | Sort results (e.g., `destination_node_count DESC`).         |
| `cache_strategy`                          | Cache strategy to use. Defaults to `CACHE_STRATEGY_LEGACY`. |

### Workflow

1. Submit a saved query for async execution using this endpoint with the query `id`.
2. The response includes `query_result_id`, `last_completed_cache_id`, and `cache_id`.
3. If `last_completed_cache_id` is present, cached results are available immediately.
4. Poll results using [GetQuerySpecNodesAsync](/4yItIzMvkpAvMVFAamTf/developers/api/query-builder/getqueryspecnodesasync.md) with the `query_result_id` until `status` = `DONE`.
5. Retrieve paginated results from the response when `status` = `DONE`.


---

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