swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector Query API
schemes:
- https
tags:
- name: Query
paths:
/query:
parameters:
- $ref: '#/parameters/traceparent'
- $ref: '#/parameters/tracestate'
post:
tags:
- Query
operationId: microsoftAzureQueryQuerytwins
description: 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.
x-ms-examples:
Query for digital twins:
$ref: ./examples/QueryFirstPage.json
Retrieve paged query results:
$ref: ./examples/QueryNextPage.json
Query for digital twins through a relationship:
$ref: ./examples/QueryJoin.json
parameters:
- name: querySpecification
in: body
description: The query specification to execute.
required: true
schema:
$ref: '#/definitions/QuerySpecification'
- $ref: '#/parameters/max-items-per-page'
- $ref: '#/parameters/api-version'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/QueryResult'
headers:
query-charge:
description: The query charge.
type: number
default:
description: Default response.
schema:
$ref: '#/definitions/ErrorResponse'
summary: Microsoft Azure Post Query
definitions:
ErrorResponse:
description: Error response.
required:
- error
properties:
error:
$ref: '#/definitions/Error'
description: The error details.
QueryResult:
description: The results of a query operation and an optional continuation token.
type: object
required:
- value
properties:
value:
description: The query results.
type: array
items:
type: object
continuationToken:
description: A token which can be used to construct a new QuerySpecification to retrieve the next set of results.
type: string
QuerySpecification:
description: A query specification containing either a query statement or a continuation token from a previous query result.
type: object
properties:
query:
description: The query to execute. This value is ignored if a continuation token is provided.
type: string
continuationToken:
description: A token which is used to retrieve the next set of results from a previous query.
type: string
InnerError:
description: A more specific error description than was provided by the containing error.
properties:
code:
description: A more specific error code than was provided by the containing error.
type: string
innererror:
description: An object containing more specific information than the current object about the error.
$ref: '#/definitions/InnerError'
Error:
description: Error definition.
properties:
code:
description: Service specific error code which serves as the substatus for the HTTP error code.
type: string
readOnly: true
message:
description: A human-readable representation of the error.
type: string
readOnly: true
details:
description: Internal error details.
type: array
items:
$ref: '#/definitions/Error'
readOnly: true
innererror:
description: An object containing more specific information than the current object about the error.
$ref: '#/definitions/InnerError'
parameters:
tracestate:
name: tracestate
in: header
description: Provides vendor-specific trace identification information and is a companion to traceparent.
required: false
type: string
x-ms-parameter-location: method
x-ms-parameter-grouping:
postfix: Options
traceparent:
name: traceparent
in: header
description: Identifies the request in a distributed tracing system.
required: false
type: string
x-ms-parameter-location: method
x-ms-parameter-grouping:
postfix: Options
max-items-per-page:
name: max-items-per-page
in: header
description: The maximum number of items to retrieve per request. The server may choose to return less than the requested number.
required: false
type: integer
x-ms-client-name: MaxItemsPerPage
x-ms-parameter-location: method
x-ms-parameter-grouping:
postfix: Options
api-version:
name: api-version
in: query
description: The requested API version.
required: true
type: string
minLength: 1
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'