Amazon Redshift Result Retrieval API

Retrieve results from completed SQL statement executions

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 /#GetStatementResult Fetch cached results of a SQL statement · Get Statement Result #
Ask an LLM
“How do I get the JSON result of a SQL statement I ran in Redshift Data API?”
“Can I wait a few seconds for a long-running statement's results to be ready before fetching them?”
Tell an agent
Fetch the result of statement {Id}.
Get the next page of results for statement {Id} using token {NextToken}, waiting up to {WaitTimeSeconds} seconds.

Documentation

Specifications

Schemas & Data

Other Resources

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-redshift:amazon-redshift-result-retrieval-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

amazon-redshift-result-retrieval-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Redshift Result Retrieval API
  version: '2012-12-01'
  description: Generated from AWS's published Smithy model for Amazon Redshift. 1 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://redshift-data.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#GetStatementResult:
    post:
      operationId: GetStatementResult
      summary: Get Statement Result
      description: Fetches the temporarily cached result of an SQL statement in JSON format. The ExecuteStatement or BatchExecuteStatement
        operation that ran the SQL statement must have specified ResultFormat as JSON , or let the format default to JSON.
        A token is returned to page through the statement results. For more information about the Amazon Redshift Data API
        and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetStatementResultResponse'
        '400':
          description: ActiveWaitingRequestsExceededException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ActiveWaitingRequestsExceededException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RedshiftData.GetStatementResult
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetStatementResultRequest'
      tags:
      - Result Retrieval
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: redshift-data
  schemas:
    ActiveWaitingRequestsExceededException:
      type: object
      properties:
        Message:
          type: string
    ColumnMetadata:
      type: object
      properties:
        isCaseSensitive:
          type: boolean
          description: A value that indicates whether the column is case-sensitive.
        isCurrency:
          type: boolean
          description: A value that indicates whether the column contains currency values.
        isSigned:
          type: boolean
          description: A value that indicates whether an integer column is signed.
        label:
          type: string
          description: The label for the column.
        name:
          type: string
          description: The name of the column.
        nullable:
          type: integer
          description: A value that indicates whether the column is nullable.
        precision:
          type: integer
          description: The precision value of a decimal number column, or the column length for a non-numeric column.
        scale:
          type: integer
          description: The scale value of a decimal number column.
        schemaName:
          type: string
          description: The name of the schema that contains the table that includes the column.
        tableName:
          type: string
          description: The name of the table that includes the column.
        typeName:
          type: string
          description: The database-specific data type of the column.
        length:
          type: integer
          description: The length of the column.
        columnDefault:
          type: string
          description: The default value of the column.
    Field:
      type: object
      properties:
        isNull:
          type: boolean
          description: A value that indicates whether the data is NULL.
        booleanValue:
          type: boolean
          description: A value of the Boolean data type.
        longValue:
          type: integer
          description: A value of the long data type.
        doubleValue:
          type: number
          description: A value of the double data type.
        stringValue:
          type: string
          description: A value of the string data type.
        blobValue:
          type: string
          format: byte
          description: A value of the BLOB data type.
      description: Exactly one member is set.
    GetStatementResultRequest:
      type: object
      properties:
        Id:
          type: string
          description: The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
            identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement.
            For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement
            of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
        WaitTimeSeconds:
          type: integer
          description: The number of seconds to wait for the SQL statement to complete execution before returning the result.
            The maximum value is 30 seconds.
      required:
      - Id
    GetStatementResultResponse:
      type: object
      properties:
        Records:
          type: array
          items:
            type: array
            items:
              $ref: '#/components/schemas/Field'
          description: The results of the SQL statement in JSON format.
        ColumnMetadata:
          type: array
          items:
            $ref: '#/components/schemas/ColumnMetadata'
          description: The properties (metadata) of a column.
        TotalNumRows:
          type: integer
          description: The total number of rows in the result set returned from a query. You can use this number to estimate
            the number of calls to the GetStatementResult operation needed to page through the results.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
      required:
      - Records
    InternalServerException:
      type: object
      properties:
        Message:
          type: string
          description: The exception message.
      required:
      - Message
    ResourceNotFoundException:
      type: object
      properties:
        Message:
          type: string
          description: The exception message.
        ResourceId:
          type: string
          description: Resource identifier associated with the exception.
      required:
      - Message
      - ResourceId
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/redshift-data/service/2019-12-20/redshift-data-2019-12-20.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)