## GET /v1/sessions/{id}/timeline

Read what a session did, newest first.

Required permissions: read:sessions.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation. Only the token's own session.
Higher permission levels include lower levels: read < write < delete.
Grant match patterns can further restrict access to individual resources.

### Response

```text
{
  "events": [ # list[EnvironmentTimelineEvent | SessionClosedTimelineEvent |
  # GithubCloneTimelineEvent | GithubPushTimelineEvent |
  # GithubCommitTimelineEvent | GithubPullRequestTimelineEvent |
  # GithubIssueTimelineEvent | GithubReleaseTimelineEvent |
  # GithubWorkflowTimelineEvent | GithubRefusedTimelineEvent |
  # GithubOtherTimelineEvent]
    {
      "at": str,
      "branch": str,
      "ok": bool,
      "paths": [
        str
      ],
      "repository": str,
      "type": "github.commit"
    }
  ]
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.sessions.timeline("...")
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.sessions.timeline('...');
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/sessions/{id}/timeline" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "events": {
      "items": {
        "oneOf": [
          {
            "properties": {
              "action": {
                "enum": [
                  "started",
                  "ready",
                  "asleep",
                  "awake"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "type": {
                "const": "environment",
                "default": "environment",
                "type": "string"
              }
            },
            "required": [
              "type",
              "action",
              "at"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "const": "closed",
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "type": {
                "const": "session",
                "default": "session",
                "type": "string"
              }
            },
            "required": [
              "type",
              "action",
              "at"
            ],
            "type": "object"
          },
          {
            "properties": {
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "type": "string"
              },
              "type": {
                "const": "github.clone",
                "default": "github.clone",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "repository"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "enum": [
                  "pushed",
                  "created",
                  "deleted"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "branch": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "type": "string"
              },
              "tag": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "const": "github.push",
                "default": "github.push",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "action",
              "repository",
              "branch",
              "tag"
            ],
            "type": "object"
          },
          {
            "properties": {
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "branch": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ok": {
                "type": "boolean"
              },
              "paths": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "repository": {
                "type": "string"
              },
              "type": {
                "const": "github.commit",
                "default": "github.commit",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "repository",
              "branch",
              "paths"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "enum": [
                  "opened",
                  "edited",
                  "ready_for_review",
                  "converted_to_draft",
                  "review_requested",
                  "commented",
                  "reviewed",
                  "review_commented",
                  "thread_resolved",
                  "branch_updated",
                  "auto_merge_enabled",
                  "merge_queued",
                  "merged",
                  "closed",
                  "reopened"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "number": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "review": {
                "anyOf": [
                  {
                    "enum": [
                      "approved",
                      "changes_requested",
                      "commented"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "const": "github.pull_request",
                "default": "github.pull_request",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "action",
              "repository",
              "number",
              "review"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "enum": [
                  "opened",
                  "edited",
                  "commented",
                  "closed",
                  "reopened"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "number": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "const": "github.issue",
                "default": "github.issue",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "action",
              "repository",
              "number"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "enum": [
                  "created",
                  "edited",
                  "deleted"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "type": "string"
              },
              "tag": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "const": "github.release",
                "default": "github.release",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "action",
              "repository",
              "tag"
            ],
            "type": "object"
          },
          {
            "properties": {
              "action": {
                "enum": [
                  "dispatched",
                  "rerun",
                  "cancelled",
                  "logs_read"
                ],
                "type": "string"
              },
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "repository": {
                "type": "string"
              },
              "run_id": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "const": "github.workflow",
                "default": "github.workflow",
                "type": "string"
              },
              "workflow": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "action",
              "repository",
              "workflow",
              "run_id"
            ],
            "type": "object"
          },
          {
            "properties": {
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              },
              "type": {
                "const": "github.refused",
                "default": "github.refused",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "reason"
            ],
            "type": "object"
          },
          {
            "properties": {
              "at": {
                "format": "date-time",
                "type": "string"
              },
              "method": {
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "operation": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "path": {
                "type": "string"
              },
              "type": {
                "const": "github.other",
                "default": "github.other",
                "type": "string"
              }
            },
            "required": [
              "at",
              "ok",
              "type",
              "method",
              "path",
              "operation"
            ],
            "type": "object"
          }
        ]
      },
      "type": "array"
    }
  },
  "required": [
    "events"
  ],
  "type": "object"
}
```
