Amazon Timestream Query API

Operations for querying time series data.

Operations 2

POST /#CancelQuery Cancel Query #
POST /#Query 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-timestream:amazon-timestream-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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-timestream-query-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Timestream Write Query API
  version: '2018-11-01'
  description: Generated from AWS's published Smithy model for Amazon Timestream Write. 2 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://query.timestream.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CancelQuery:
    post:
      operationId: CancelQuery
      summary: Cancel Query
      description: Cancels a query that has been issued. Cancellation is provided only if the query has not completed running
        before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation
        requests will return a CancellationMessage, indicating that the query has already been canceled. See code sample for
        details.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/CancelQueryResponse'
        '403':
          description: AccessDeniedException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamAccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamInternalServerException'
        '421':
          description: InvalidEndpointException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InvalidEndpointException'
        '429':
          description: ThrottlingException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamThrottlingException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Timestream_20181101.CancelQuery
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/CancelQueryRequest'
      tags:
      - Query
  /#Query:
    post:
      operationId: Query
      summary: Query
      description: 'Query is a synchronous operation that enables you to run a query against your Amazon Timestream data.
        If you enabled QueryInsights, this API also returns insights and metrics related to the query that you executed. QueryInsights
        helps with performance tuning of your query. For more information about QueryInsights, see Using query insights to
        optimize queries in Amazon Timestream. The maximum number of Query API requests you''re allowed to make with QueryInsights
        enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling. Query will time
        out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the code
        sample for details. Your query request will fail in the following cases: If you submit a Query request with the same
        client token outside of the 5-minute idempotency window. If you submit a Query request with the same client token,
        but change other parameters, within the 5-minute idempotency window. If the size of the row (including the query metadata)
        exceeds 1 MB, then the query will fail with the following error message: Query aborted as max page response size has
        been exceeded by the output r'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryResponse'
        '403':
          description: AccessDeniedException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamAccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamConflictException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamInternalServerException'
        '421':
          description: InvalidEndpointException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InvalidEndpointException'
        '400':
          description: QueryExecutionException; ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryExecutionException'
        '429':
          description: ThrottlingException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/QueryTimestreamThrottlingException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Timestream_20181101.Query
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/QueryRequest'
      tags:
      - Query
components:
  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: timestream
  schemas:
    CancelQueryRequest:
      type: object
      properties:
        QueryId:
          type: string
          description: The ID of the query that needs to be cancelled. QueryID is returned as part of the query result.
      required:
      - QueryId
    CancelQueryResponse:
      type: object
      properties:
        CancellationMessage:
          type: string
          description: A CancellationMessage is returned when a CancelQuery request for the query specified by QueryId has
            already been issued.
    ColumnInfo:
      type: object
      properties:
        Name:
          type: string
          description: The name of the result set column. The name of the result set is available for columns of all data
            types except for arrays.
        Type:
          $ref: '#/components/schemas/Type'
      required:
      - Type
    Datum:
      type: object
      properties:
        ScalarValue:
          type: string
          description: Indicates if the data point is a scalar value such as integer, string, double, or Boolean.
        TimeSeriesValue:
          type: array
          items:
            $ref: '#/components/schemas/TimeSeriesDataPoint'
          description: Indicates if the data point is a timeseries data type.
        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.
    InvalidEndpointException:
      type: object
      properties:
        Message:
          type: string
    QueryExecutionException:
      type: object
      properties:
        Message:
          type: string
    QueryInsights:
      type: object
      properties:
        Mode:
          type: string
          enum:
          - ENABLED_WITH_RATE_CONTROL
          - DISABLED
          description: 'Provides the following modes to enable QueryInsights: ENABLED_WITH_RATE_CONTROL – Enables QueryInsights
            for the queries being processed. This mode also includes a rate control mechanism, which limits the QueryInsights
            feature to 1 query per second (QPS). DISABLED – Disables QueryInsights.'
      required:
      - Mode
    QueryInsightsResponse:
      type: object
      properties:
        QuerySpatialCoverage:
          $ref: '#/components/schemas/QuerySpatialCoverage'
        QueryTemporalRange:
          $ref: '#/components/schemas/QueryTemporalRange'
        QueryTableCount:
          type: integer
          description: Indicates the number of tables in the query.
        OutputRows:
          type: integer
          description: Indicates the total number of rows returned as part of the query result set. You can use this data
            to validate if the number of rows in the result set have changed as part of the query tuning exercise.
        OutputBytes:
          type: integer
          description: Indicates the size of query result set in bytes. You can use this data to validate if the result set
            has changed as part of the query tuning exercise.
        UnloadPartitionCount:
          type: integer
          description: Indicates the partitions created by the Unload operation.
        UnloadWrittenRows:
          type: integer
          description: Indicates the rows written by the Unload query.
        UnloadWrittenBytes:
          type: integer
          description: Indicates the size, in bytes, written by the Unload operation.
    QueryRequest:
      type: object
      properties:
        QueryString:
          type: string
          description: The query to be run by Timestream.
        ClientToken:
          type: string
          description: 'Unique, case-sensitive string of up to 64 ASCII characters specified when a Query request is made.
            Providing a ClientToken makes the call to Query idempotent. This means that running the same query repeatedly
            will produce the same result. In other words, making multiple identical Query requests has the same effect as
            making a single request. When using ClientToken in a query, note the following: If the Query API is instantiated
            without a ClientToken, the Query SDK generates a ClientToken on your behalf. If the Query invocation only contains
            the ClientToken but does not include a NextToken, tha'
        NextToken:
          type: string
          description: 'A pagination token used to return a set of results. When the Query API is invoked using NextToken,
            that particular invocation is assumed to be a subsequent invocation of a prior call to Query, and a result set
            is returned. However, if the Query invocation only contains the ClientToken, that invocation of Query is assumed
            to be a new query run. Note the following when using NextToken in a query: A pagination token can be used for
            up to five Query invocations, OR for a duration of up to 1 hour – whichever comes first. Using the same NextToken
            will return the same set of records. To keep paginati'
        MaxRows:
          type: integer
          description: 'The total number of rows to be returned in the Query output. The initial run of Query with a MaxRows
            value specified will return the result set of the query in two cases: The size of the result is less than 1MB.
            The number of rows in the result set is less than the value of maxRows. Otherwise, the initial invocation of Query
            only returns a NextToken, which can then be used in subsequent calls to fetch the result set. To resume pagination,
            provide the NextToken value in the subsequent command. If the row size is large (e.g. a row has many columns),
            Timestream may return fewer rows to keep the r'
        QueryInsights:
          $ref: '#/components/schemas/QueryInsights'
      required:
      - QueryString
    QueryResponse:
      type: object
      properties:
        QueryId:
          type: string
          description: A unique ID for the given query.
        NextToken:
          type: string
          description: A pagination token that can be used again on a Query call to get the next set of results.
        Rows:
          type: array
          items:
            $ref: '#/components/schemas/Row'
          description: The result set rows returned by the query.
        ColumnInfo:
          type: array
          items:
            $ref: '#/components/schemas/ColumnInfo'
          description: The column data types of the returned result set.
        QueryStatus:
          $ref: '#/components/schemas/QueryStatus'
        QueryInsightsResponse:
          $ref: '#/components/schemas/QueryInsightsResponse'
      required:
      - QueryId
      - Rows
      - ColumnInfo
    QuerySpatialCoverage:
      type: object
      properties:
        Max:
          $ref: '#/components/schemas/QuerySpatialCoverageMax'
    QuerySpatialCoverageMax:
      type: object
      properties:
        Value:
          type: number
          description: The maximum ratio of spatial coverage.
        TableArn:
          type: string
          description: The Amazon Resource Name (ARN) of the table with the most sub-optimal spatial pruning.
        PartitionKey:
          type: array
          items:
            type: string
          description: The partition key used for partitioning, which can be a default measure_name or a customer defined
            partition key.
    QueryStatus:
      type: object
      properties:
        ProgressPercentage:
          type: number
          description: The progress of the query, expressed as a percentage.
        CumulativeBytesScanned:
          type: integer
          description: The amount of data scanned by the query in bytes. This is a cumulative sum and represents the total
            amount of bytes scanned since the query was started.
        CumulativeBytesMetered:
          type: integer
          description: The amount of data scanned by the query in bytes that you will be charged for. This is a cumulative
            sum and represents the total amount of data that you will be charged for since the query was started. The charge
            is applied only once and is either applied when the query completes running or when the query is cancelled.
    QueryTemporalRange:
      type: object
      properties:
        Max:
          $ref: '#/components/schemas/QueryTemporalRangeMax'
    QueryTemporalRangeMax:
      type: object
      properties:
        Value:
          type: integer
          description: The maximum duration in nanoseconds between the start and end of the query.
        TableArn:
          type: string
          description: The Amazon Resource Name (ARN) of the table which is queried with the largest time range.
    QueryTimestreamAccessDeniedException:
      type: object
      properties:
        Message:
          type: string
    QueryTimestreamConflictException:
      type: object
      properties:
        Message:
          type: string
    QueryTimestreamInternalServerException:
      type: object
      properties:
        Message:
          type: string
    QueryTimestreamThrottlingException:
      type: object
      properties:
        Message:
          type: string
    QueryTimestreamValidationException:
      type: object
      properties:
        Message:
          type: string
    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
    TimeSeriesDataPoint:
      type: object
      properties:
        Time:
          type: string
          description: The timestamp when the measure value was collected.
        Value:
          $ref: '#/components/schemas/Datum'
      required:
      - Time
      - Value
    Type:
      type: object
      properties:
        ScalarType:
          type: string
          enum:
          - VARCHAR
          - BOOLEAN
          - BIGINT
          - DOUBLE
          - TIMESTAMP
          - DATE
          - TIME
          - INTERVAL_DAY_TO_SECOND
          - INTERVAL_YEAR_TO_MONTH
          - UNKNOWN
          - INTEGER
          description: Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more
            information, see Supported data types.
        ArrayColumnInfo:
          $ref: '#/components/schemas/ColumnInfo'
        TimeSeriesMeasureValueColumnInfo:
          $ref: '#/components/schemas/ColumnInfo'
        RowColumnInfo:
          type: array
          items:
            $ref: '#/components/schemas/ColumnInfo'
          description: Indicates if the column is a row.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/timestream-query/service/2018-11-01/timestream-query-2018-11-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)