Amazon Athena Named Queries API

Operations for creating and managing saved SQL queries

Operations 5

POST /?Action=CreateNamedQuery Amazon Athena Create Named Query #
POST /?Action=DeleteNamedQuery Amazon Athena Delete Named Query #
POST /?Action=GetNamedQuery Amazon Athena Get Named Query #
POST /?Action=ListNamedQueries Amazon Athena List Named Queries #
POST /?Action=BatchGetNamedQuery Amazon Athena Batch Get Named Query #

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-athena-named-queries-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-athena-named-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Athena Data Catalogs Named Queries API
  description: Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run.
  version: '2017-05-18'
  contact:
    name: AWS Support
    url: https://aws.amazon.com/premiumsupport/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://athena.us-east-1.amazonaws.com
  description: Amazon Athena API endpoint
security:
- sigv4: []
tags:
- name: Named Queries
  description: Operations for creating and managing saved SQL queries
paths:
  /?Action=CreateNamedQuery:
    post:
      operationId: createNamedQuery
      summary: Amazon Athena Create Named Query
      description: Creates a named query in the specified workgroup. Requires that you have access to the workgroup.
      tags:
      - Named Queries
      x-microcks-operation:
        delay: 100
        dispatcher: QUERY_MATCH
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNamedQueryInput'
            examples:
              default:
                x-microcks-default: true
                value:
                  Name: MyNamedQuery
                  Description: A sample named query
                  Database: my_database
                  QueryString: SELECT * FROM my_table WHERE date > '2024-01-01'
                  WorkGroup: primary
      responses:
        '200':
          description: Named query created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateNamedQueryOutput'
              examples:
                default:
                  x-microcks-default: true
                  value:
                    NamedQueryId: c3d4e5f6-a7b8-9012-cdef-123456789012
  /?Action=DeleteNamedQuery:
    post:
      operationId: deleteNamedQuery
      summary: Amazon Athena Delete Named Query
      description: Deletes the named query if you have access to the workgroup in which the query was saved.
      tags:
      - Named Queries
      x-microcks-operation:
        delay: 100
        dispatcher: QUERY_MATCH
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteNamedQueryInput'
            examples:
              default:
                x-microcks-default: true
                value:
                  NamedQueryId: c3d4e5f6-a7b8-9012-cdef-123456789012
      responses:
        '200':
          description: Named query deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteNamedQueryOutput'
              examples:
                default:
                  x-microcks-default: true
                  value: {}
  /?Action=GetNamedQuery:
    post:
      operationId: getNamedQuery
      summary: Amazon Athena Get Named Query
      description: Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
      tags:
      - Named Queries
      x-microcks-operation:
        delay: 100
        dispatcher: QUERY_MATCH
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetNamedQueryInput'
            examples:
              default:
                x-microcks-default: true
                value:
                  NamedQueryId: c3d4e5f6-a7b8-9012-cdef-123456789012
      responses:
        '200':
          description: Named query retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetNamedQueryOutput'
              examples:
                default:
                  x-microcks-default: true
                  value:
                    NamedQuery:
                      NamedQueryId: c3d4e5f6-a7b8-9012-cdef-123456789012
                      Name: MyNamedQuery
                      Description: A sample named query
                      Database: my_database
                      QueryString: SELECT * FROM my_table WHERE date > '2024-01-01'
                      WorkGroup: primary
  /?Action=ListNamedQueries:
    post:
      operationId: listNamedQueries
      summary: Amazon Athena List Named Queries
      description: Provides a list of available query IDs only for queries saved in the specified workgroup.
      tags:
      - Named Queries
      x-microcks-operation:
        delay: 100
        dispatcher: QUERY_MATCH
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListNamedQueriesInput'
            examples:
              default:
                x-microcks-default: true
                value:
                  WorkGroup: primary
                  MaxResults: 10
      responses:
        '200':
          description: Named query IDs listed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListNamedQueriesOutput'
              examples:
                default:
                  x-microcks-default: true
                  value:
                    NamedQueryIds:
                    - c3d4e5f6-a7b8-9012-cdef-123456789012
                    NextToken: ''
  /?Action=BatchGetNamedQuery:
    post:
      operationId: batchGetNamedQuery
      summary: Amazon Athena Batch Get Named Query
      description: Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings.
      tags:
      - Named Queries
      x-microcks-operation:
        delay: 100
        dispatcher: QUERY_MATCH
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchGetNamedQueryInput'
            examples:
              default:
                x-microcks-default: true
                value:
                  NamedQueryIds:
                  - c3d4e5f6-a7b8-9012-cdef-123456789012
      responses:
        '200':
          description: Named queries retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchGetNamedQueryOutput'
              examples:
                default:
                  x-microcks-default: true
                  value:
                    NamedQueries:
                    - NamedQueryId: c3d4e5f6-a7b8-9012-cdef-123456789012
                      Name: MyNamedQuery
                      Database: my_database
                      QueryString: SELECT * FROM my_table
                    UnprocessedNamedQueryIds: []
components:
  schemas:
    DeleteNamedQueryOutput:
      type: object
    ListNamedQueriesInput:
      type: object
      properties:
        NextToken:
          type: string
        MaxResults:
          type: integer
        WorkGroup:
          type: string
    ListNamedQueriesOutput:
      type: object
      properties:
        NamedQueryIds:
          type: array
          items:
            type: string
        NextToken:
          type: string
    BatchGetNamedQueryOutput:
      type: object
      properties:
        NamedQueries:
          type: array
          items:
            $ref: '#/components/schemas/NamedQuery'
        UnprocessedNamedQueryIds:
          type: array
          items:
            $ref: '#/components/schemas/UnprocessedNamedQueryId'
    BatchGetNamedQueryInput:
      type: object
      required:
      - NamedQueryIds
      properties:
        NamedQueryIds:
          type: array
          items:
            type: string
    CreateNamedQueryInput:
      type: object
      required:
      - Name
      - Database
      - QueryString
      properties:
        Name:
          type: string
          description: The query name
        Description:
          type: string
          description: The query description
        Database:
          type: string
          description: The database to which the query belongs
        QueryString:
          type: string
          description: The contents of the query with all query statements
        ClientRequestToken:
          type: string
        WorkGroup:
          type: string
          description: The name of the workgroup in which the named query is being created
    GetNamedQueryOutput:
      type: object
      properties:
        NamedQuery:
          $ref: '#/components/schemas/NamedQuery'
    GetNamedQueryInput:
      type: object
      required:
      - NamedQueryId
      properties:
        NamedQueryId:
          type: string
    NamedQuery:
      type: object
      properties:
        Name:
          type: string
        Description:
          type: string
        Database:
          type: string
        QueryString:
          type: string
        NamedQueryId:
          type: string
        WorkGroup:
          type: string
    UnprocessedNamedQueryId:
      type: object
      properties:
        NamedQueryId:
          type: string
        ErrorCode:
          type: string
        ErrorMessage:
          type: string
    CreateNamedQueryOutput:
      type: object
      properties:
        NamedQueryId:
          type: string
          description: The unique ID of the query
    DeleteNamedQueryInput:
      type: object
      required:
      - NamedQueryId
      properties:
        NamedQueryId:
          type: string
  securitySchemes:
    sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4