Microsoft Azure Query API

The Query API from Microsoft Azure, for query.

GitHub OpenAPI

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /query Query digital twins and their relationships · Microsoft Azure Post Query #
Ask an LLM
“How do I find digital twins by property value in my Azure Digital Twins graph?”
“Can I traverse relationships between twins in a single query?”
Tell an agent
Run the digital twins query {query}.
Fetch the next page of twin query results with continuation token {continuationToken}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure:microsoft-azure-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2023-02-27-preview
  title: Microsoft Azure Azure Digital Twins Query API
  description: A service for managing and querying digital twins and digital twin models.
servers:
- url: https://digitaltwins-hostname
security:
- oauth2: []
tags:
- name: Query
paths:
  /query:
    parameters:
    - $ref: '#/components/parameters/traceparent'
    - $ref: '#/components/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:
      - $ref: '#/components/parameters/max-items-per-page'
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success
          headers:
            query-charge:
              description: The query charge.
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        default:
          description: Default response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Microsoft Azure Post Query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuerySpecification'
        description: The query specification to execute.
        required: true
components:
  parameters:
    traceparent:
      name: traceparent
      in: header
      description: Identifies the request in a distributed tracing system.
      required: false
      x-ms-parameter-location: method
      x-ms-parameter-grouping:
        postfix: Options
      schema:
        type: string
    api-version:
      name: api-version
      in: query
      description: The requested API version.
      required: true
      schema:
        type: string
        minLength: 1
    tracestate:
      name: tracestate
      in: header
      description: Provides vendor-specific trace identification information and is a companion to traceparent.
      required: false
      x-ms-parameter-location: method
      x-ms-parameter-grouping:
        postfix: Options
      schema:
        type: string
    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
      x-ms-client-name: MaxItemsPerPage
      x-ms-parameter-location: method
      x-ms-parameter-grouping:
        postfix: Options
      schema:
        type: integer
    Version:
      in: query
      name: api-version
      description: The version of the API being called.
      x-ms-parameter-location: client
      required: true
      schema:
        type: string
  schemas:
    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: '#/components/schemas/InnerError'
    ErrorResponse:
      description: Error response.
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: The error details.
    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: '#/components/schemas/Error'
          readOnly: true
        innererror:
          description: An object containing more specific information than the current object about the error.
          $ref: '#/components/schemas/InnerError'
    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
    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
    QueryRequest:
      description: The query request payload definition.
      type: object
      properties:
        query:
          description: Query to be executed.
          type: string
      required:
      - query
    ErrorDetails:
      description: The detail information of the error.
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message details.
        requestId:
          type: string
          description: Correlation Id for current request.
        time:
          type: string
          format: date-time-rfc1123
          description: The time that error request failed.
      required:
      - code
      - message
    QueryResponse:
      description: The query response payload definition.
      type: object
      properties:
        results:
          type: array
          items:
            type: object
      required:
      - results
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          scopes: {}
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow