---
title: "Get session"
url: https://hexelstudio.com/docs/api/titan/administration/get-session
---

# Get session

**GET** `/titan/admin/sessions/{id}`

## Path parameters

- `id: string`

## Query parameters

- `include: optional string`

  swarm: add the live swarm view of the session's tree. Accepted only where the Gateway's swarm supervision lists the deployment; otherwise, like any other query, INVALID_REQUEST.

  One of: `"swarm"`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

- `Titan-Enforcement-Deployment: optional string`

  The enforcement deployment this call acts on (its td-... id). Required on the shared plane, where one Gateway serves many tenants and there is no default: a missing, unknown, repeated or other organization's deployment answers 403, like a failed authorization. Optional on a dedicated cell, which defaults to its one deployment.

## Returns

`200` Successful response; exact status varies by operation. (`object`)

- `created_at: string`

- `deployment_id: string`

- `expires_at: string`

- `instance_id: string`

- `kill_scope: string`

  One of: `"none"`, `"session"`, `"agent"`, `"deployment"`, `"workspace"`, `"organization"`, `"unknown"`

- `killed: boolean`

- `lease_expires_at: string`

- `runtime_principal_id: string`

- `session_id: string`

- `state: string`

  One of: `"active"`, `"suspended"`, `"revoked"`, `"expired"`, `"closed"`

- `swarm: optional object`

  Only with include=swarm.

  - `critical_path: array of string`

    Task ids of the longest chain of unfinished tasks through their dependencies, first task first.

  - `locks: array of object`

  - `nodes: array of object`

    The root first, then by depth and creation.

    - `capability_ids: array of string`

      The session's capability limit; null when not narrowed.

    - `created_at: string`

    - `depth: integer`

    - `durable_session_id: string`

    - `expires_at: string`

    - `governed_action_budget: integer`

    - `governed_actions_used: integer`

      The cost: governed actions of the session and its subtree (rolled up for budgeted sessions).

    - `live: boolean`

      It can act now: it and every ancestor active and unexpired, not killed at the session level, not a leg of a held durable session.

    - `parent_session_id: string`

    - `session_id: string`

    - `state: string`

      The stored state; expired once past its expiry or its instance lease.

      One of: `"active"`, `"suspended"`, `"revoked"`, `"expired"`, `"closed"`

  - `root_session_id: string`

  - `tasks: array of object`

  - `truncated: boolean`

    A list reached 1,000 and was cut.

## Errors

- `400` Admin error
- `403` Admin error
- `404` Admin error
- `503` Admin error

## Example

```bash
curl --request GET \
  --url 'https://api.hexelstudio.com/v1/titan/admin/sessions/{id}' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (200)

```json
{
  "created_at": "2026-01-01T00:00:00Z",
  "deployment_id": "string",
  "expires_at": "2026-01-01T00:00:00Z",
  "instance_id": "string",
  "kill_scope": "none",
  "killed": true,
  "lease_expires_at": "2026-01-01T00:00:00Z",
  "runtime_principal_id": "string",
  "session_id": "string",
  "state": "active",
  "swarm": {
    "critical_path": [
      "string"
    ],
    "locks": [
      {}
    ],
    "nodes": [
      {
        "capability_ids": [
          "string"
        ],
        "created_at": "2026-01-01T00:00:00Z",
        "depth": 0,
        "durable_session_id": "string",
        "expires_at": "2026-01-01T00:00:00Z",
        "governed_action_budget": 0,
        "governed_actions_used": 0,
        "live": true,
        "parent_session_id": "string",
        "session_id": "string",
        "state": "active"
      }
    ],
    "root_session_id": "string",
    "tasks": [
      {}
    ],
    "truncated": true
  }
}
```

### Response (400)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (503)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
