---
title: "POST /#X-Amz-Target=AmazonAthena.ListQueryExecutions"
method: POST
path: "/#X-Amz-Target=AmazonAthena.ListQueryExecutions"
---

# POST /#X-Amz-Target=AmazonAthena.ListQueryExecutions

`POST /#X-Amz-Target=AmazonAthena.ListQueryExecutions`

Provides a list of available query execution IDs for the queries in the specified workgroup. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran.

For code samples using the Amazon Web Services SDK for Java, see [Examples and Code Samples](http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the _Amazon Athena User Guide_.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

- `X-Amz-Target` 'AmazonAthena.ListQueryExecutions', required

## Request body

- ListQueryExecutionsInput
  - `NextToken` string — 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 <code>NextToken</code> from the response object of the previous page call.
  - `MaxResults` integer — The maximum number of query executions to return in this request.
  - `WorkGroup` string — The name of the workgroup from which queries are being returned. If a workgroup is not specified, a list of available query execution IDs for the queries in the primary workgroup is returned.

## Response `200`

Success

- ListQueryExecutionsOutput
  - `QueryExecutionIds` QueryExecutionId[] — The unique IDs of each query execution as an array of strings.
  - `NextToken` string — A token to be used by the next request if this request is truncated.

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
