---
title: "POST /query"
method: POST
path: "/query"
tags: ["Query"]
---

# POST /query

`POST /query`

Executes a query that allows traversing relationships and filtering by property values.
Status codes:
* 200 OK
* 400 Bad Request
  * BadRequest - The continuation token is invalid.
  * SqlQueryError - The query contains some errors.
  * TimeoutError - The query execution timed out after 60 seconds. Try simplifying the query or adding conditions to reduce the result size.
 * 429 Too Many Requests
  * QuotaReachedError - The maximum query rate limit has been reached.

## Query parameters

- `api-version` string, required

## Headers

- `max-items-per-page` integer

## Request body

- QuerySpecification — A query specification containing either a query statement or a continuation token from a previous query result.
  - `query` string — The query to execute. This value is ignored if a continuation token is provided.
  - `continuationToken` string — A token which is used to retrieve the next set of results from a previous query.

## Response `200`

Success

- QueryResult — The results of a query operation and an optional continuation token.
  - `value` object[], required — The query results.
  - `continuationToken` string — A token which can be used to construct a new QuerySpecification to retrieve the next set of results.

## Other responses

- `default` — Default response.

---

[API](https://skmtc.net/azure/apis/digitaltwins-digitaltwins.md) · [All operations](https://skmtc.net/azure/apis/digitaltwins-digitaltwins/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/digitaltwins-digitaltwins/versions/8d81dcdaf9a2/schema)
