---
title: "Get the current branch details"
method: GET
path: "/repos/{repo_id}/branches/{branch_id}"
tags: ["Repository Branch Manipulation"]
---

# Get the current branch details

`GET /repos/{repo_id}/branches/{branch_id}`

## Request

- Base URL: `https://api.diversion.dev/v0`
- URL: `https://api.diversion.dev/v0/repos/{repo_id}/branches/{branch_id}`
- Auth: one of:
  - OAuth 2
    - Implicit: `https://auth.diversion.dev/oauth2/authorize`
    - Scopes: `coreapi/read`
  - OAuth 2
    - Implicit: `https://auth.diversion.dev/oauth2/authorize`
    - Scopes: `coreapi/write`
- TypeScript: <https://skmtc.dev/diversion/apis/diversion-core-api/docs/repos/:repo_id/branches/:branch_id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Response `200`

Branch details returned

- Branch
  - `commit_id` string, required
  - `branch_name` string, required
  - `branch_description` string
  - `branch_id` string, required: Branch identifier in Diversion
  - `author` User, required: User details
    - `image` string: URL of the user image. If updating the image, could be a base64 encoded image.
    - `email` string, email
    - `full_name` string
    - `id` string, required
    - `name` string
    - `tier` 'EDUCATION' | 'INDIE' | 'PROFESSIONAL' | 'ENTERPRISE' | 'UNKNOWN': The tier of the user
  - `time` number, required: Creation time

## Other responses

- `default`: An error occurred

---

[API](https://skmtc.dev/diversion/apis/diversion-core-api.md) - [All operations](https://skmtc.dev/diversion/apis/diversion-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/diversion/apis/diversion-core-api/revisions/38a18aba804b?raw)
