Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Xata Branches API

Operations for managing database branches within projects, including creation, configuration, and deletion

Xata Branches API is one of 12 APIs that Xata publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Branches. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 11 operations across 8 paths, and defines 29 schemas. It is described by OpenAPI 3.0.0, at version 1.0.

Requests are made against a single base URL, https://api.xata.tech.

11 operations 8 paths 29 schemas 1 DELETE4 GET1 PATCH5 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
1.0
Base URL
https://api.xata.tech
Authentication
OpenID Connect, API Key, OAuth 2.0, API Key
Contact
help@xata.io
Resource Areas
1

Authentication & Security 4

Xata Branches API declares 4 security schemes for authenticating requests. It supports OpenID Connect (oidc) discovered at https://auth.xata.io/realms/xata/.well-known/openid-configuration. An API key is passed in the header as Authorization (apiKey). It supports OAuth 2.0 (xata) using the implicit flow, exposing 13 scopes. An API key is passed in the header as Connection-String (branchConnectionString).

  • apiKey — API key authentication using Bearer token format: Bearer
  • branchConnectionString — Branch PostgreSQL connection string (postgres://user:pass@{branch}.{region}.xata.tech/db), including the embedded password. The hostname selects the target bra…

Paths & Operations 11

Across 8 paths, the API surfaces 11 operations — 1 DELETE, 4 GET, 1 PATCH, 5 POST. Each is listed below with its method, path, parameters, and response codes.

Branches 11

Operations for managing database branches within projects, including creation, configuration, and deletion

GET
/organizations/{organizationID}/projects/{projectID}/branches
List all branches
listBranches 2 params → 2004004014045XXdefault
POST
/organizations/{organizationID}/projects/{projectID}/branches
Create a new branch
createBranch 2 params body → 2014004014044125XXdefault
GET
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}
Get branch details
describeBranch 3 params → 2004004014045XXdefault
PATCH
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}
Update branch details
updateBranch 3 params body → 2004004014045XXdefault
DELETE
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}
Delete a branch
deleteBranch 3 params → 2044004014045XXdefault
GET
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/credentials
Retrieve branch credentials
getBranchCredentials 4 params → 2004004014045XXdefault
POST
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/credentials/rotate
Rotate branch credentials
rotateBranchCredentials 3 params body → 2044004014045XXdefault
POST
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/metrics
Retrieve branch metrics
branchMetrics 3 params body → 2004004014045XXdefault
POST
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/restore
Create a new branch from a backup of another branch
restoreFromBackup 3 params body → 2014004014045XXdefault
POST
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/logs
Retrieve branch logs
branchLogs 3 params body → 2004004014045XXdefault
GET
/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/postgres-config
Get PostgreSQL configuration details
getBranchPostgresConfig 3 params → 2004004014045XXdefault

Schemas 29

The contract defines 29 schemas that model the data the API accepts and returns. The most detailed are BranchMetadata (14 properties), PostgresConfigParameter (11 properties), BranchUpdateDetails (11 properties), BranchListMetadata (9 properties). Each schema is shown below with its type and property counts.

BranchMetricResult
object
Time-series for a single metric.
3 properties 3 required
BranchFromConfiguration
object
2 properties 2 required
BranchCredentials
object
Credentials for accessing a branch, username and password
2 properties 2 required
RestoreDetails
object
Metadata about a backup, used in request to create a restore. If configuration is not provided, the branch will inherit the source branch configuration.
5 properties 1 required
BranchStatus
object
Detailed status information about a branch and its underlying database cluster
7 properties 5 required
BranchListMetadata
object
Metadata about a branch used when listing branches in a project
9 properties 7 required
BranchShortMetadata
object
Basic metadata about a branch, used in response to create/update operations
9 properties 6 required
BranchMetrics
object
A collection of metrics (cpu, memory, disk,...) for each of the instances of a branch
3 properties 3 required
BranchLogs
object
A collection of logs for each of the instances of a branch
4 properties 4 required
LogLevel
string
Log level enumeration
RotateCredentialsRequest
object
Request to rotate credentials for a branch database user
1 property 1 required
BranchMetadata
object
Detailed metadata about a branch, including its status and configuration
14 properties 11 required
LogFilter
object
A single filter on log entries.
4 properties 2 required
ClusterConfiguration
object
Configuration details for a database cluster backing a branch
7 properties 4 required
BranchLogsRequest
object
5 properties 2 required
MetricSeries
object
The metric series
3 properties 3 required
PostgresConfigDetails
object
Detailed information about PostgreSQL configuration parameters for a branch
1 property 1 required
BranchUpdateDetails
object
Details that can be updated for an existing branch
11 properties
PostgresConfigParameter
object
Detailed information about a single PostgreSQL configuration parameter
11 properties 9 required
ClusterLifecycle
object
Information about the current lifecycle state of a database cluster
3 properties 2 required
ScaleToZeroConfiguration
object
Configuration for scaling branches to zero when not in use
2 properties 2 required
BranchMetricName
string
Name of a branch metric exposed by the API.
LogEntry
object
5 properties 3 required
BranchFromParent
object
2 properties 2 required
BranchCreationDetails
object
Details required when creating a new branch
5 properties 2 required
OrganizationID
string
BranchMetricsRequest
object
5 properties 4 required
BackupConfiguration
object
Details about the branch continuous backup configuration
2 properties
InstanceStatus
object
Status information about an individual database instance within a cluster
4 properties 4 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

xata-branches-api-openapi.yml Raw ↑

Other APIs Xata publishes across the network.

Xata API Keys API
Xata Billing API
Xata Gateway API
Xata GitHub App API
Xata Logs API
Xata Marketplace API
Xata Metrics API
Xata Organizations API
Xata Projects API
Xata Projects Webhooks API
Xata Webhooks API