Amazon Athena Athena Calculation Execution API
The Athena Calculation Execution API from Amazon Athena — 4 operation(s) for athena calculation execution.
The Athena Calculation Execution API from Amazon Athena — 4 operation(s) for athena calculation execution.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/amazon-athena:amazon-athena-calculation-execution-api"
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.
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: 3.2.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: []
tags:
- name: Calculation Execution
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:
schemas:
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.
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
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
GetCalculationExecutionRequest:
type: object
properties:
CalculationExecutionId:
type: string
description: The calculation execution UUID.
required:
- CalculationExecutionId
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.
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.
InvalidRequestException:
type: object
properties:
AthenaErrorCode:
type: string
Message:
type: string
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
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.
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'
StopCalculationExecutionRequest:
type: object
properties:
CalculationExecutionId:
type: string
description: The calculation execution UUID.
required:
- CalculationExecutionId
CalculationConfiguration:
type: object
properties:
CodeBlock:
type: string
description: A string that contains the code for the calculation.
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.
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).
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
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/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)