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

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

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

Lists available workgroups for the account.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

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

## Request body

- ListWorkGroupsInput
  - `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 workgroups to return in this request.

## Response `200`

Success

- ListWorkGroupsOutput
  - `WorkGroups` WorkGroupSummary[] — A list of <a>WorkGroupSummary</a> objects that include the names, descriptions, creation times, and states for each workgroup.
    - `Name` string — The name of the workgroup.
    - `State` 'ENABLED' | 'DISABLED' — The state of the workgroup.
    - `Description` string — The workgroup description.
    - `CreationTime` string, date-time — The workgroup creation date and time.
    - `EngineVersion` object — The engine version setting for all queries on the workgroup. Queries on the <code>AmazonAthenaPreviewFunctionality</code> workgroup run on the preview engine regardless of this setting.
      - `SelectedEngineVersion` string — The engine version requested by the user. Possible values are determined by the output of <code>ListEngineVersions</code>, including AUTO. The default is AUTO.
      - `EffectiveEngineVersion` string — Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a <code>CreateWorkGroup</code> or <code>UpdateWorkGroup</code> operation, the <code>EffectiveEngineVersion</code> field is ignored.
  - `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.

## 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/revisions/0aec8c61283d/schema)
