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

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

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

Lists, in descending order, the sessions that have been created in a notebook that are in an active state like <code>CREATING</code>, <code>CREATED</code>, <code>IDLE</code> or <code>BUSY</code>. Newer sessions are listed first; older sessions are listed later.

## Headers

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

## Request body

- ListNotebookSessionsRequest
  - `NotebookId` string, required — The ID of the notebook to list sessions for.
  - `MaxResults` integer — The maximum number of notebook sessions to return.
  - `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.

## Response `200`

Success

- ListNotebookSessionsResponse
  - `NotebookSessionsList` NotebookSessionSummary[], required — A list of the sessions belonging to the notebook.
    - `SessionId` string — The notebook session ID.
    - `CreationTime` string, date-time — The time when the notebook session was created.
  - `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
- `482` — ResourceNotFoundException

---

[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)
