# Get one runbook session

> Source: https://elaichi.ai/docs/api-reference/workflows/automation/getautomationsession/

`GET /automation/{id}/session/{sessionId}`

Resource: **Workflow** · API: **Workflows**

## Path parameters

- **`id`** _(string, required)_
  Resource id
- **`sessionId`** _(string, required)_
  Session id

## Response body

- **`session_id`** _(string)_
- **`automation_id`** _(string)_
- **`key`** _(string)_
- **`title`** _(string)_
- **`generation`** _(integer)_
- **`status`** _(string)_
  Allowed: `open`, `closed`
- **`close_reason`** _(string,null)_
  Allowed: `closed_by_user`, `idle`, `null`
- **`closed_at`** _(string,null)_
- **`closed_by`** _(string,null)_
- **`run_count`** _(integer)_
- **`last_run_id`** _(string,null)_
- **`last_status`** _(string,null)_
- **`active_run_id`** _(string,null)_
- **`queued_runs`** _(integer)_
- **`participant_count`** _(integer)_
- **`artifact_count`** _(integer)_
- **`artifacts_unrecorded`** _(integer)_
- **`thread`** _(object | null)_
  _One of:_
  - **object**
    - **`kind`** _(unknown)_
    - **`team_id`** _(string)_
    - **`channel_id`** _(string)_
    - **`ts`** _(string)_
    - **`permalink`** _(string,null)_
- **`created_at`** _(string)_
- **`last_activity_at`** _(string)_
- **`participant_preview`** _(object)_
  - **`names`** _(array<string>)_
    At most 3.
  - **`count`** _(integer)_
- **`can_close`** _(boolean)_
- **`can_continue`** _(boolean)_
- **`closed_by_display_name`** _(string,null)_
- **`waiting`** _(object,null)_
- **`runbook`** _(object | null)_
  _One of:_
  - **object**
    - **`collection_id`** _(string)_
    - **`row_id`** _(string)_
    - **`first_run_id`** _(string)_
    - **`last_run_id`** _(string)_
    - **`updated_at`** _(string)_
    - **`collection_name`** _(string,null)_
    - **`row_title`** _(string,null)_
    - **`row_version`** _(integer,null)_
    - **`visible`** _(boolean)_
      False when the caller cannot see the row: the names then come back null.
- **`transcript_available`** _(boolean)_
- **`runs_as`** _(object)_
  - **`owner_name`** _(string,null)_
- **`console_url`** _(string)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/automation/<id>/session/<sessionId>' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/automation/<id>/session/<sessionId>', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/automation/<id>/session/<sessionId>"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
