---
title: "Get a branch"
method: GET
path: "/projects/{id}/databases/{databaseName}/branches/{branchName}"
tags: ["Database Branches"]
---

# Get a branch

`GET /projects/{id}/databases/{databaseName}/branches/{branchName}`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/databases/{databaseName}/branches/{branchName}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns the branch, including its connection string once it is `active`.
Poll this after creating a branch to learn when it is connectable.

## Path parameters

- `id` string, uuid, required
- `databaseName` string, required
- `branchName` string, required

## Response `200`

Successful response

- DatabaseBranch: A copy-on-write fork of a database, for development and testing. A branch starts as an exact copy of its parent's data and diverges from there. It has its own connection string and its own credential, so a branch password cannot reach the parent. Every branch expires. `expires_at` is a hard deadline: once it passes the branch stops accepting connections and is deleted. Use `PATCH` to extend a branch you are still working on.
  - `id` string, uuid, required
  - `database_id` string, uuid, required: The parent database this branch was forked from.
  - `project_id` string, uuid, required
  - `name` string, required: Branch name, unique within the parent database.
  - `status` 'provisioning' | 'active' | 'failed' | 'deleting', required: Branch status. A new branch starts `provisioning` and is not connectable until it reports `active`; poll this endpoint until it does. `connection_string` is only present while `active`. `provisioning` also covers a branch being rebuilt after a `reset`, and a build that is between retries, so it is the status to keep waiting on. `failed` is terminal: it means the platform gave up, and the branch will not become `active` on its own.
  - `connection_string` string: PostgreSQL connection URI for this branch. Present only while the branch is `active`. The URI carries the branch's own globally-unique username and password; `application_name` selects the access mode exactly as it does for the parent database: - `volcano_full_access` — Full admin access (DDL, migrations) - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) - `volcano_user_access` — Anonymous access (anon role, RLS enforced)
  - `ttl_seconds` integer, required: The lifetime the branch was created with. Resetting a branch re-arms this same duration, so a reset never shortens a branch's remaining life.
  - `expires_at` string, date-time, required: When the branch stops serving connections and becomes eligible for deletion. Enforced on the connection path, so it holds even if reclamation is delayed.
  - `storage_bytes` integer: Bytes this branch has diverged from its parent, which is what a branch actually costs. Shared pages are not counted twice. Counts against the parent database's storage allowance. Absent until the branch has been sampled.
  - `last_invoked_at` string, date-time: Most recent request timestamp for this branch
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `404`: Project, database, or branch not found
- `503`: Branching is temporarily unavailable

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 6 breaking, 16 info
  - added the new path request parameter `branchName`
  - added the new path request parameter `databaseName`
  - added the new path request parameter `id`
  - the response's body type changed from no type to `object` for status `200`
  - …18 more
- **2026-08-27** `bb44e98aba2e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/databases/:databaseName/branches/:branchName/get.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
