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

# GET /sites/{site_id}/database/branch/{branch_id}

`GET /sites/{site_id}/database/branch/{branch_id}`

Returns the database branch connection string for a specific branch.

## Query parameters

- `role` 'netlifydb_owner' | 'netlifydb_readonly'

## Response `200`

OK

- DatabaseBranchResponse — Response containing the database branch connection string
  - `connection_string` string — The connection string for the database branch
  - `metadata` object — Metadata associated with the branch

## Other responses

- `404` — Branch not found
- `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)
