Amazon Athena Athena Calculation Execution API

The Athena Calculation Execution API from Amazon Athena — 4 operation(s) for athena calculation execution.

GitHub OpenAPI

Operations 4

POST /#GetCalculationExecution Get Calculation Execution #
POST /#ListCalculationExecutions List Calculation Executions #
POST /#StartCalculationExecution Start Calculation Execution #
POST /#StopCalculationExecution Stop Calculation Execution #

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-athena:amazon-athena-calculation-execution-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-athena-calculation-execution-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Athena Calculation Execution API
  version: '2017-05-18'
  description: Generated from AWS's published Smithy model for Amazon Athena. 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://athena.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#GetCalculationExecution:
    post:
      operationId: GetCalculationExecution
      summary: Get Calculation Execution
      description: Describes a previously submitted calculation execution.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetCalculationExecutionResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: InvalidRequestException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AmazonAthena.GetCalculationExecution
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetCalculationExecutionRequest'
      tags:
      - Calculation Execution
  /#ListCalculationExecutions:
    post:
      operationId: ListCalculationExecutions
      summary: List Calculation Executions
      description: Lists the calculations that have been submitted to a session in descending order. Newer calculations are
        listed first; older calculations are listed later.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListCalculationExecutionsResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: InvalidRequestException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AmazonAthena.ListCalculationExecutions
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListCalculationExecutionsRequest'
      tags:
      - Calculation Execution
  /#StartCalculationExecution:
    post:
      operationId: StartCalculationExecution
      summary: Start Calculation Execution
      description: Submits calculations for execution within a session. You can supply the code to run as an inline code block
        within the request. The request syntax requires the StartCalculationExecutionRequest$CodeBlock parameter or the CalculationConfiguration$CodeBlock
        parameter, but not both. Because CalculationConfiguration$CodeBlock is deprecated, use the StartCalculationExecutionRequest$CodeBlock
        parameter instead.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/StartCalculationExecutionResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: InvalidRequestException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AmazonAthena.StartCalculationExecution
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/StartCalculationExecutionRequest'
      tags:
      - Calculation Execution
  /#StopCalculationExecution:
    post:
      operationId: StopCalculationExecution
      summary: Stop Calculation Execution
      description: Requests the cancellation of a calculation. A StopCalculationExecution call on a calculation that is already
        in a terminal state (for example, STOPPED, FAILED, or COMPLETED) succeeds but has no effect. Cancelling a calculation
        is done on a best effort basis. If a calculation cannot be cancelled, you can be charged for its completion. If you
        are concerned about being charged for a calculation that cannot be cancelled, consider terminating the session in
        which the calculation is running.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/StopCalculationExecutionResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: InvalidRequestException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AmazonAthena.StopCalculationExecution
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/StopCalculationExecutionRequest'
      tags:
      - Calculation Execution
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: athena
  schemas:
    CalculationConfiguration:
      type: object
      properties:
        CodeBlock:
          type: string
          description: A string that contains the code for the calculation.
    CalculationResult:
      type: object
      properties:
        StdOutS3Uri:
          type: string
          description: The Amazon S3 location of the stdout file for the calculation.
        StdErrorS3Uri:
          type: string
          description: The Amazon S3 location of the stderr error messages file for the calculation.
        ResultS3Uri:
          type: string
          description: The Amazon S3 location of the folder for the calculation results.
        ResultType:
          type: string
          description: The data format of the calculation result.
    CalculationStatistics:
      type: object
      properties:
        DpuExecutionInMillis:
          type: integer
          description: The data processing unit execution time in milliseconds for the calculation.
        Progress:
          type: string
          description: The progress of the calculation.
    CalculationStatus:
      type: object
      properties:
        SubmissionDateTime:
          type: string
          format: date-time
          description: The date and time the calculation was submitted for processing.
        CompletionDateTime:
          type: string
          format: date-time
          description: The date and time the calculation completed processing.
        State:
          type: string
          enum:
          - CREATING
          - CREATED
          - QUEUED
          - RUNNING
          - CANCELING
          - CANCELED
          - COMPLETED
          - FAILED
          description: The state of the calculation execution. A description of each state follows. CREATING - The calculation
            is in the process of being created. CREATED - The calculation has been created and is ready to run. QUEUED - The
            calculation has been queued for processing. RUNNING - The calculation is running. CANCELING - A request to cancel
            the calculation has been received and the system is working to stop it. CANCELED - The calculation is no longer
            running as the result of a cancel request. COMPLETED - The calculation has completed without error. FAILED - The
            calculation failed and is no longer running.
        StateChangeReason:
          type: string
          description: The reason for the calculation state change (for example, the calculation was canceled because the
            session was terminated).
    CalculationSummary:
      type: object
      properties:
        CalculationExecutionId:
          type: string
          description: The calculation execution UUID.
        Description:
          type: string
          description: A description of the calculation.
        Status:
          $ref: '#/components/schemas/CalculationStatus'
    GetCalculationExecutionRequest:
      type: object
      properties:
        CalculationExecutionId:
          type: string
          description: The calculation execution UUID.
      required:
      - CalculationExecutionId
    GetCalculationExecutionResponse:
      type: object
      properties:
        CalculationExecutionId:
          type: string
          description: The calculation execution UUID.
        SessionId:
          type: string
          description: The session ID that the calculation ran in.
        Description:
          type: string
          description: The description of the calculation execution.
        WorkingDirectory:
          type: string
          description: The Amazon S3 location in which calculation results are stored.
        Status:
          $ref: '#/components/schemas/CalculationStatus'
        Statistics:
          $ref: '#/components/schemas/CalculationStatistics'
        Result:
          $ref: '#/components/schemas/CalculationResult'
    InternalServerException:
      type: object
      properties:
        Message:
          type: string
    InvalidRequestException:
      type: object
      properties:
        AthenaErrorCode:
          type: string
        Message:
          type: string
    ListCalculationExecutionsRequest:
      type: object
      properties:
        SessionId:
          type: string
          description: The session ID.
        StateFilter:
          type: string
          enum:
          - CREATING
          - CREATED
          - QUEUED
          - RUNNING
          - CANCELING
          - CANCELED
          - COMPLETED
          - FAILED
          description: A filter for a specific calculation execution state. A description of each state follows. CREATING
            - The calculation is in the process of being created. CREATED - The calculation has been created and is ready
            to run. QUEUED - The calculation has been queued for processing. RUNNING - The calculation is running. CANCELING
            - A request to cancel the calculation has been received and the system is working to stop it. CANCELED - The calculation
            is no longer running as the result of a cancel request. COMPLETED - The calculation has completed without error.
            FAILED - The calculation failed and is no lo
        MaxResults:
          type: integer
          description: The maximum number of calculation executions to return.
        NextToken:
          type: string
          description: A token generated by the Athena service that specifies where to continue pagination if a previous request
            was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous
            page call.
      required:
      - SessionId
    ListCalculationExecutionsResponse:
      type: object
      properties:
        NextToken:
          type: string
          description: A token generated by the Athena service that specifies where to continue pagination if a previous request
            was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous
            page call.
        Calculations:
          type: array
          items:
            $ref: '#/components/schemas/CalculationSummary'
          description: A list of CalculationSummary objects.
    StartCalculationExecutionRequest:
      type: object
      properties:
        SessionId:
          type: string
          description: The session ID.
        Description:
          type: string
          description: A description of the calculation.
        CalculationConfiguration:
          $ref: '#/components/schemas/CalculationConfiguration'
        CodeBlock:
          type: string
          description: A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock,
            which is deprecated.
        ClientRequestToken:
          type: string
          description: A unique case-sensitive string used to ensure the request to create the calculation is idempotent (executes
            only once). If another StartCalculationExecutionRequest is received, the same response is returned and another
            calculation is not created. If a parameter has changed, an error is returned. This token is listed as not required
            because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for
            users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this
            token or the action will fail.
      required:
      - SessionId
    StartCalculationExecutionResponse:
      type: object
      properties:
        CalculationExecutionId:
          type: string
          description: The calculation execution UUID.
        State:
          type: string
          enum:
          - CREATING
          - CREATED
          - QUEUED
          - RUNNING
          - CANCELING
          - CANCELED
          - COMPLETED
          - FAILED
          description: CREATING - The calculation is in the process of being created. CREATED - The calculation has been created
            and is ready to run. QUEUED - The calculation has been queued for processing. RUNNING - The calculation is running.
            CANCELING - A request to cancel the calculation has been received and the system is working to stop it. CANCELED
            - The calculation is no longer running as the result of a cancel request. COMPLETED - The calculation has completed
            without error. FAILED - The calculation failed and is no longer running.
    StopCalculationExecutionRequest:
      type: object
      properties:
        CalculationExecutionId:
          type: string
          description: The calculation execution UUID.
      required:
      - CalculationExecutionId
    StopCalculationExecutionResponse:
      type: object
      properties:
        State:
          type: string
          enum:
          - CREATING
          - CREATED
          - QUEUED
          - RUNNING
          - CANCELING
          - CANCELED
          - COMPLETED
          - FAILED
          description: CREATING - The calculation is in the process of being created. CREATED - The calculation has been created
            and is ready to run. QUEUED - The calculation has been queued for processing. RUNNING - The calculation is running.
            CANCELING - A request to cancel the calculation has been received and the system is working to stop it. CANCELED
            - The calculation is no longer running as the result of a cancel request. COMPLETED - The calculation has completed
            without error. FAILED - The calculation failed and is no longer running.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/athena/service/2017-05-18/athena-2017-05-18.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)