---
title: "Get Session Git"
method: GET
path: "/v1/sessions/{id}/git"
tags: ["v1"]
---

# Get Session Git

`GET /v1/sessions/{id}/git`

## Request

- Base URL: `https://api.ellipsis.dev`
- URL: `https://api.ellipsis.dev/v1/sessions/{id}/git`
- Auth: HTTP bearer

The session's GitHub-side git view: its commits, and each PR it
opened joined to the live gh_prs row and reviews. The identity list
(output_git) rides the session itself over the WebSocket; this is
the join a "run" notify tells an open pane to refetch.

## Path parameters

- `id` string, required

## Headers

- `user-agent` string, nullable

## Response `200`

Successful Response

- SessionGitResponse
  - `repos` SessionGitRepoEntry[], required
    - `commits` SessionGitCommit[], required
      - `committed_at` string, date-time, required
      - `pushed` boolean, required
      - `sha` string, required
      - `subject` string, required
    - `commits_total` integer, required
    - `full_name` string, required
    - `prs` SessionPrEntry[], required
      - `number` integer, required
      - `pull_request` PullRequest, required: A GitHub pull request. A session's pull requests are read live. A review's is kept as it was when the review ran.
        - `additions` integer, nullable: Lines added, null until GitHub reports them.
        - `author` GithubAccountSnippet, required: Sometimes the GitHub API returns a user of github (can include bots) using this snippet instead of the full GithubAccount model. One example, is when the API returns a pull request. This is the least amount of info we need to represent a GitHub account.
          - `avatar_url` string, required
          - `id` integer, required
          - `login` string, required
          - `name` string, nullable, required
          - `type` 'User' | 'Organization' | 'Bot' | 'Mannequin', required
        - `base` PullRequestBranch, required: One side of a pull request, a branch and the commit it pointed at.
          - `ref` string, required: The branch name.
          - `sha` string, required: The commit the branch pointed at.
        - `changed_files` integer, nullable: Files changed, null until GitHub reports them.
        - `commits` integer, nullable: Commits, null until GitHub reports them.
        - `created_at` string, date-time, required
        - `deletions` integer, nullable: Lines deleted, null until GitHub reports them.
        - `head` PullRequestBranch, required: One side of a pull request, a branch and the commit it pointed at.
          - `ref` string, required: The branch name.
          - `sha` string, required: The commit the branch pointed at.
        - `id` integer, required: The pull request's GitHub id.
        - `merged_at` string, date-time, nullable
        - `number` integer, required
        - `repository` GithubRepositorySnippet, required: A GitHub repository, named by its owner and name.
          - `id` integer, required: The GitHub repository id.
          - `name` string, required: The repository name.
          - `owner` string, required: The repository owner's login.
        - `status` 'open' | 'draft' | 'merged' | 'closed', required
        - `title` string, required
        - `updated_at` string, date-time, required
        - `url` string, required: The pull request on GitHub.
      - `reviews` SessionPullRequestReview[], required
        - `body` string, nullable, required
        - `html_url` string, required
        - `id` integer, required
        - `state` string, required
        - `submitted_at` string, date-time, required
        - `user` GithubAccountSnippet, required: Sometimes the GitHub API returns a user of github (can include bots) using this snippet instead of the full GithubAccount model. One example, is when the API returns a pull request. This is the least amount of info we need to represent a GitHub account.
          - `avatar_url` string, required
          - `id` integer, required
          - `login` string, required
          - `name` string, nullable, required
          - `type` 'User' | 'Organization' | 'Bot' | 'Mannequin', required
      - `url` string, required

## Other responses

- `401`: The bearer token is missing, invalid, or revoked.
- `403`: The credential may not perform this action, or the account is blocked.
- `422`: Validation Error

---

[API](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api.md) - [All operations](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/revisions/344b16df9a1a?raw)
