---
title: "GET /sites/{site_id}/database/branches"
method: GET
path: "/sites/{site_id}/database/branches"
tags: ["database"]
---

# GET /sites/{site_id}/database/branches

`GET /sites/{site_id}/database/branches`

Returns all branches for the site's database with compute status and metadata.

## Response `200`

OK

- DatabaseBranchesResponse — Response containing a list of database branches
  - `branches` DatabaseBranchDetail[] — List of database branches
    - `branch_id` string — The branch identifier
    - `name` string — The branch name
    - `connection_string` string — The connection string for the branch
    - `state` 'init' | 'creating' | 'resetting' | 'ready' | 'archived' — The current state of the branch
    - `logical_size_bytes` integer — The logical size of the branch in bytes
    - `created_at` string, dateTime — When the branch was created
    - `updated_at` string, dateTime — When the branch was last updated
    - `last_active_at` string, dateTime — When the branch was last active
    - `compute` DatabaseBranchCompute — Compute endpoint status for a branch
      - `current_state` 'active' | 'idle' — The current state of the compute endpoint
      - `autoscaling_limit_min_cu` number, double — Minimum compute units for autoscaling
      - `autoscaling_limit_max_cu` number, double — Maximum compute units for autoscaling
      - `suspend_timeout_seconds` integer — Seconds of inactivity before the compute endpoint is suspended
      - `last_active` string, dateTime — When the compute endpoint was last active
    - `metadata` object — Metadata associated with the branch

## Other responses

- `default` — error

---

[API](https://skmtc.net/netlify/apis/netlify-s-api-documentation.md) · [All operations](https://skmtc.net/netlify/apis/netlify-s-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netlify/netlify-s-api-documentation/versions/71540d1b5d9d/schema)
