Skip to main content
GET
/
organizations
/
{organizationID}
/
projects
/
{projectID}
/
branches
/
{branchID}
Get branch details
curl --request GET \
  --url https://api.xata.tech/organizations/{organizationID}/projects/{projectID}/branches/{branchID} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "parentID": "<string>",
  "region": "<string>",
  "status": {
    "status": "<string>",
    "statusType": "STATUS_TYPE_UNSPECIFIED",
    "message": "<string>",
    "lifecycle": {
      "state": "ready",
      "reason": "<string>",
      "phase": "<string>"
    },
    "instanceCount": 3,
    "instanceReadyCount": 2,
    "instances": [
      {
        "id": "<string>",
        "status": "<string>",
        "primary": true,
        "targetPrimary": true
      }
    ]
  },
  "connectionString": "<string>",
  "publicAccess": true,
  "backupsEnabled": true,
  "scaleToZero": {
    "enabled": true,
    "inactivityPeriodMinutes": 30
  },
  "configuration": {
    "region": "<string>",
    "storage": 99,
    "instanceType": "<string>",
    "image": "postgresql:17",
    "replicas": 2,
    "postgresConfigurationParameters": {},
    "preloadLibraries": [
      "<string>"
    ]
  },
  "backupConfiguration": {
    "retentionPeriod": 2,
    "backupTime": "<string>"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organizationID
string
required

Unique identifier of the organization containing the project

projectID
string
required

Unique identifier of the project containing the branch

branchID
string
required

Unique identifier of the branch to retrieve details for

Response

Branch details retrieved successfully

Detailed metadata about a branch, including its status and configuration

id
string
required

Unique identifier for the branch

name
string
required

Human-readable name of the branch

createdAt
string<date-time>
required

Timestamp when the branch was created

updatedAt
string<date-time>
required

Timestamp when the branch was last updated

region
string
required

Geographic region where the branch is deployed

status
object
required

Detailed status information about a branch and its underlying database cluster

connectionString
string | null
required

Database connection string for accessing this branch

publicAccess
boolean
required

Whether the branch allows public access without authentication

backupsEnabled
boolean
required

Whether the branch is in a region that supports backups

scaleToZero
object
required

Configuration for scaling branches to zero when not in use

configuration
object
required

Configuration details for a database cluster backing a branch

description
string

Optional description of the branch purpose or contents

parentID
string | null

Identifier of the parent branch if this is a derived branch, null otherwise

backupConfiguration
object

Details about the branch continuous backup configuration