> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session

Retrieve details of a specific session.

The session's `status` reports where it is in its lifecycle — `open`, `closing`, `closed` or
`deleting`. See [Session Lifecycle](/blob-types/workflow/workflows/session-lifecycle) for what
each permits.

## **POST** `/revisions/:id/data/query` (Command: `get_session`)

### Request Body

| Parameter    | Type   | Required | Description                     |
| :----------- | :----- | :------- | :------------------------------ |
| `engine`     | string | Yes      | Must be `workflow_blobhub`.     |
| `command`    | string | Yes      | Must be `get_session`.          |
| `session_id` | string | Yes      | The ID or alias of the session. |

See [Alias Grammar](/blob-types/scheduler/overview#alias-grammar) for the character rules, length
limits and which commands accept an alias in place of an id.

### Response

| Parameter | Type   | Description         |
| :-------- | :----- | :------------------ |
| `session` | object | The session object. |

### Example

<CodeGroup>
  ```json Request theme={null}
  {
    "engine": "workflow_blobhub",
    "command": "get_session",
    "session_id": "sess_001"
  }
  ```

  ```json Response theme={null}
  {
    "status": "success",
    "session": {
      "id": "sess_001",
      "alias": "primary",
      "status": "open"
    }
  }
  ```
</CodeGroup>

Alias resolution reads a secondary index that is eventually consistent, so an alias assigned moments
earlier may not resolve yet. Hold the `id` returned by `create_session` rather than re-resolving the
session by alias on every call.
