Amazon IoT SiteWise Iot Sitewise Queries API

The Iot Sitewise Queries API from Amazon IoT SiteWise — 3 operation(s) for iot sitewise queries.

Operations 4

GET /workspaces/{workspaceName}/queries/{queryId} Describe Query #
POST /queries/execution Execute Query #
GET /workspaces/{workspaceName}/queries List Queries #
POST /workspaces/{workspaceName}/queries Start Query #

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/amazon-iot-sitewise:amazon-iot-sitewise-queries-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

amazon-iot-sitewise-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AWS IoT SiteWise Queries API
  version: '2019-12-02'
  description: Generated from AWS's published Smithy model for AWS IoT SiteWise. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://iotsitewise.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
tags:
- name: Queries
paths:
  /workspaces/{workspaceName}/queries/{queryId}:
    get:
      operationId: DescribeQuery
      summary: Describe Query
      description: Retrieves information about a query, including its status.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescribeQueryResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeQueryRequest'
      tags:
      - Queries
  /queries/execution:
    post:
      operationId: ExecuteQuery
      summary: Execute Query
      description: Run SQL queries to retrieve metadata and time-series data from asset models, assets, measurements, metrics, transforms, and aggregates.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteQueryResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; QueryTimeoutException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteQueryRequest'
      tags:
      - Queries
  /workspaces/{workspaceName}/queries:
    get:
      operationId: ListQueries
      summary: List Queries
      description: Retrieves a paginated list of queries for a workspace.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQueriesResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListQueriesRequest'
      tags:
      - Queries
    post:
      operationId: StartQuery
      summary: Start Query
      description: Starts an asynchronous SQL query against workspace telemetry, annotations, data segment, and dataset data.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartQueryResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictingOperationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictingOperationException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartQueryRequest'
      tags:
      - Queries
components:
  schemas:
    ServiceUnavailableException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    StartQueryResponse:
      type: object
      properties:
        queryId:
          type: string
          description: The unique identifier for the query execution.
        status:
          type: string
          enum:
          - SUBMITTED
          - RUNNING
          - COMPLETED
          - FAILED
          - CANCELED
          - CANCELING
          description: The initial query status. The value is always SUBMITTED upon creation.
      required:
      - queryId
      - status
    DescribeQueryRequest:
      type: object
      properties:
        workspaceName:
          type: string
          description: The name of the workspace associated with the query.
        queryId:
          type: string
          description: The unique identifier for the query execution.
      required:
      - workspaceName
      - queryId
    QueryStatistics:
      type: object
      properties:
        rowCount:
          type: integer
          description: The total number of rows returned by the query.
        bytesScanned:
          type: integer
          description: The total number of bytes scanned during query execution.
        executionTimeInMillis:
          type: integer
          description: The total query execution time, in milliseconds.
      required:
      - rowCount
      - bytesScanned
      - executionTimeInMillis
    ConflictingOperationException:
      type: object
      properties:
        message:
          type: string
        resourceId:
          type: string
          description: The ID of the resource that conflicts with this operation.
        resourceArn:
          type: string
          description: The ARN of the resource that conflicts with this operation.
      required:
      - message
      - resourceId
      - resourceArn
    ListQueriesResponse:
      type: object
      properties:
        queries:
          type: array
          items:
            $ref: '#/components/schemas/QuerySummary'
          description: A list of query summaries for the workspace.
        nextToken:
          type: string
          description: The token for the next set of results, or null if there are no additional results.
      required:
      - queries
    StartQueryRequest:
      type: object
      properties:
        clientToken:
          type: string
          description: A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
        workspaceName:
          type: string
          description: The name of the workspace to query.
        queryStatement:
          type: string
          description: The SQL query to execute against the workspace telemetry, annotations, data segment, and dataset data.
      required:
      - workspaceName
      - queryStatement
    ColumnInfo:
      type: object
      properties:
        name:
          type: string
          description: The name of the column description.
        type:
          $ref: '#/components/schemas/ColumnType'
    ColumnType:
      type: object
      properties:
        scalarType:
          type: string
          enum:
          - BOOLEAN
          - INT
          - DOUBLE
          - TIMESTAMP
          - STRING
          description: The allowed data types that the column has as it's value.
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    DescribeQueryResponse:
      type: object
      properties:
        queryId:
          type: string
          description: The unique identifier for the query execution.
        status:
          type: string
          enum:
          - SUBMITTED
          - RUNNING
          - COMPLETED
          - FAILED
          - CANCELED
          - CANCELING
          description: The current query status.
        submittedAt:
          type: string
          description: The date and time when the query was submitted, in Unix epoch time.
        completedAt:
          type: string
          description: The date and time when the query reached a terminal state, in Unix epoch time. This field is present when the query status is COMPLETED, FAILED, or CANCELED.
        statistics:
          $ref: '#/components/schemas/QueryStatistics'
        errorMessage:
          type: string
          description: A human-readable error description. This field is present when the query status is FAILED.
      required:
      - queryId
      - status
      - submittedAt
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    Row:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Datum'
          description: List of data points in a single row of the result set.
      required:
      - data
    Datum:
      type: object
      properties:
        scalarValue:
          type: string
          description: Indicates if the data point is a scalar value such as integer, string, double, or Boolean.
        arrayValue:
          type: array
          items:
            $ref: '#/components/schemas/Datum'
          description: Indicates if the data point is an array.
        rowValue:
          $ref: '#/components/schemas/Row'
        nullValue:
          type: boolean
          description: Indicates if the data point is null.
    InvalidRequestException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ListQueriesRequest:
      type: object
      properties:
        workspaceName:
          type: string
          description: The name of the workspace to list queries for.
        filter:
          type: string
          description: 'An optional filter to return only queries with the specified status. The value must be one of the supported query statuses: SUBMITTED, RUNNING, COMPLETED, FAILED, CANCELED, or CANCELING.'
        maxResults:
          type: integer
          description: The maximum number of results to return for each paginated request.
        nextToken:
          type: string
          description: The token to be used for the next set of paginated results.
      required:
      - workspaceName
    ExecuteQueryResponse:
      type: object
      properties:
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ColumnInfo'
          description: Represents a single column in the query results.
        rows:
          type: array
          items:
            $ref: '#/components/schemas/Row'
          description: Represents a single row in the query results.
        nextToken:
          type: string
          description: The string that specifies the next page of results.
    QuerySummary:
      type: object
      properties:
        queryId:
          type: string
          description: The unique identifier for the query execution.
        status:
          type: string
          enum:
          - SUBMITTED
          - RUNNING
          - COMPLETED
          - FAILED
          - CANCELED
          - CANCELING
          description: The current query status.
        submittedAt:
          type: string
          description: The date and time when the query was submitted, in Unix epoch time.
        completedAt:
          type: string
          description: The date and time when the query reached a terminal state, in Unix epoch time.
      required:
      - queryId
      - status
      - submittedAt
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    InternalFailureException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ExecuteQueryRequest:
      type: object
      properties:
        queryStatement:
          type: string
          description: The IoT SiteWise query statement.
        nextToken:
          type: string
          description: The string that specifies the next page of results.
        maxResults:
          type: integer
          description: The maximum number of results to return at one time. Minimum is 1 Maximum is 20000 Default is 20000
        clientToken:
          type: string
          description: A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
      required:
      - queryStatement
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: iotsitewise
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/iotsitewise/service/2019-12-02/iotsitewise-2019-12-02.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)