openapi: 3.0.0 info: title: Xata API Keys Branches API description: Xata API version: '1.0' contact: name: help@xata.io servers: - url: https://api.xata.tech description: Xata API tags: - name: Branches description: Operations for managing database branches within projects, including creation, configuration, and deletion x-displayName: Branches paths: /organizations/{organizationID}/projects/{projectID}/branches: summary: Branch Management description: Endpoints for listing and creating branches within a project. get: operationId: listBranches summary: List all branches description: Retrieves a list of all branches within the specified project, including their metadata, region, and access settings. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project to list branches from required: true schema: type: string responses: '200': description: List of branches within the project content: application/json: schema: type: object properties: branches: description: Array of branch objects with their metadata type: array items: $ref: '#/components/schemas/BranchListMetadata' required: - branches '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:read tags: - Branches post: operationId: createBranch summary: Create a new branch description: Creates a new branch within the specified project. Branches can be created from scratch or derived from an existing parent branch. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project to create the branch in required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BranchCreationDetails' responses: '201': description: Branch successfully created content: application/json: schema: $ref: '#/components/schemas/BranchShortMetadata' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' '412': $ref: '#/components/responses/PreconditionFailedError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:write tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}: summary: Branch Operations description: Endpoints for retrieving, updating, and deleting a specific branch by ID. get: operationId: describeBranch summary: Get branch details description: Retrieves detailed information about a specific branch by its ID, including status, connection string, and configuration. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project containing the branch required: true schema: type: string - name: branchID in: path description: Unique identifier of the branch to retrieve details for required: true schema: type: string responses: '200': description: Branch details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/BranchMetadata' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:read tags: - Branches patch: operationId: updateBranch summary: Update branch details description: Updates the configuration of a specific branch by its ID, such as changing its name, description, or resource allocation. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project containing the branch required: true schema: type: string - name: branchID in: path description: Unique identifier of the branch to update required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BranchUpdateDetails' responses: '200': description: Branch successfully updated content: application/json: schema: $ref: '#/components/schemas/BranchShortMetadata' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:write tags: - Branches delete: operationId: deleteBranch summary: Delete a branch description: Permanently deletes a specific branch by its ID and all associated data. This action cannot be undone. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project containing the branch required: true schema: type: string - name: branchID in: path description: Unique identifier of the branch to delete required: true schema: type: string responses: '204': description: Branch successfully deleted '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:write tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/credentials: get: operationId: getBranchCredentials summary: Retrieve branch credentials parameters: - name: organizationID in: path required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path required: true schema: type: string - name: branchID in: path required: true schema: type: string - name: username in: query description: Username that the credentials requested for required: false schema: type: string responses: '200': description: Credentials for the branch retrieved successfully content: application/json: schema: $ref: '#/components/schemas/BranchCredentials' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - credentials:read tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/credentials/rotate: post: operationId: rotateBranchCredentials summary: Rotate branch credentials description: Triggers a credential rotation for the branch database user. The new credentials can be retrieved via the credentials endpoint after rotation completes. parameters: - name: organizationID in: path required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path required: true schema: type: string - name: branchID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RotateCredentialsRequest' responses: '204': description: Credential rotation initiated successfully '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - credentials:write tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/metrics: post: operationId: branchMetrics summary: Retrieve branch metrics description: Returns time-series data for one or more metrics of a branch. parameters: - name: organizationID in: path required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path required: true schema: type: string - name: branchID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BranchMetricsRequest' responses: '200': description: Metrics for a branch content: application/json: schema: $ref: '#/components/schemas/BranchMetrics' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - metrics:read tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/restore: summary: Restore from backup description: Endpoint for restoring from a backup. post: operationId: restoreFromBackup summary: Create a new branch from a backup of another branch description: Creates a new backup branch within the specified project. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project containing the source branch required: true schema: type: string - name: branchID in: path description: Unique identifier of the source branch of the backup required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RestoreDetails' responses: '201': description: Branch successfully created content: application/json: schema: $ref: '#/components/schemas/BranchShortMetadata' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:write tags: - Branches x-excluded: true x-internal: true /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/logs: post: operationId: branchLogs summary: Retrieve branch logs parameters: - name: organizationID in: path required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path required: true schema: type: string - name: branchID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BranchLogsRequest' responses: '200': description: Logs for a branch content: application/json: schema: $ref: '#/components/schemas/BranchLogs' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - logs:read tags: - Branches /organizations/{organizationID}/projects/{projectID}/branches/{branchID}/postgres-config: get: operationId: getBranchPostgresConfig summary: Get PostgreSQL configuration details description: Retrieves detailed information about the current PostgreSQL configuration parameters for a branch, including parameter types, descriptions, acceptable ranges, default values, and current values. parameters: - name: organizationID in: path description: Unique identifier of the organization containing the project required: true schema: $ref: '#/components/schemas/OrganizationID' - name: projectID in: path description: Unique identifier of the project containing the branch required: true schema: type: string - name: branchID in: path description: Unique identifier of the branch to retrieve PostgreSQL configuration for required: true schema: type: string responses: '200': description: PostgreSQL configuration details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/PostgresConfigDetails' '400': $ref: '#/components/responses/GenericError' '401': $ref: '#/components/responses/AuthorizationError' '404': $ref: '#/components/responses/GenericError' 5XX: description: Unexpected Error default: description: Unexpected Error security: - xata: - branch:read tags: - Branches components: schemas: BranchMetricResult: description: Time-series for a single metric. type: object properties: metric: description: Name of the queried metric. type: string unit: description: Unit of the metric (percentage, bytes, ms, etc.) type: string series: type: array items: $ref: '#/components/schemas/MetricSeries' required: - metric - unit - series BranchFromConfiguration: type: object properties: mode: type: string enum: - custom configuration: $ref: '#/components/schemas/ClusterConfiguration' required: - mode - configuration BranchCredentials: description: Credentials for accessing a branch, username and password type: object properties: username: description: Username for accessing the branch database type: string password: description: Password for accessing the branch database type: string required: - username - password x-internal: true RestoreDetails: description: Metadata about a backup, used in request to create a restore. If configuration is not provided, the branch will inherit the source branch configuration. type: object properties: name: description: Human-readable name of the branch type: string description: description: Optional description of the branch purpose or contents type: string scaleToZero: $ref: '#/components/schemas/ScaleToZeroConfiguration' backupConfiguration: $ref: '#/components/schemas/BackupConfiguration' configuration: $ref: '#/components/schemas/ClusterConfiguration' required: - name x-excluded: true x-internal: true BranchStatus: description: Detailed status information about a branch and its underlying database cluster type: object properties: status: description: Status indicator for the branch according to CNPG type: string title: Current status of the cluster statusType: description: Type of status of the branch enum: - STATUS_TYPE_UNSPECIFIED - STATUS_TYPE_HEALTHY - STATUS_TYPE_TRANSIENT - STATUS_TYPE_FAULT - STATUS_TYPE_HIBERNATED message: description: Human-readable message explaining the current status type: string deprecated: true title: Summary of the cluster status lifecycle: $ref: '#/components/schemas/ClusterLifecycle' instanceCount: description: Total number of database instances in the cluster type: integer maximum: 5 minimum: 1 title: Number of instances in the cluster instanceReadyCount: description: Number of database instances that are ready and operational type: integer maximum: 5 minimum: 0 title: Number of instances ready in the cluster instances: description: Details about each individual database instance in the cluster type: array items: $ref: '#/components/schemas/InstanceStatus' title: List of instances in the cluster required: - status - statusType - instanceCount - instanceReadyCount - instances BranchListMetadata: description: Metadata about a branch used when listing branches in a project type: object properties: id: description: Unique identifier for the branch type: string name: description: Human-readable name of the branch type: string description: description: Optional description of the branch purpose or contents type: string createdAt: description: Timestamp when the branch was created type: string format: date-time updatedAt: description: Timestamp when the branch was last updated type: string format: date-time parentID: description: Identifier of the parent branch if this is a derived branch, null otherwise type: string nullable: true region: description: Geographic region where the branch is deployed type: string publicAccess: description: Whether the branch allows public access without authentication type: boolean backupsEnabled: description: Whether the branch is in a region that supports backups type: boolean required: - id - name - createdAt - updatedAt - region - publicAccess - backupsEnabled BranchShortMetadata: description: Basic metadata about a branch, used in response to create/update operations type: object properties: id: description: Unique identifier for the branch type: string name: description: Human-readable name of the branch type: string description: description: Optional description of the branch purpose or contents type: string createdAt: description: Timestamp when the branch was created type: string format: date-time updatedAt: description: Timestamp when the branch was last updated type: string format: date-time parentID: description: Identifier of the parent branch if this is a derived branch, null otherwise type: string nullable: true connectionString: description: Database connection string for accessing this branch type: string nullable: true region: description: Geographic region where the branch is deployed type: string publicAccess: description: Whether the branch allows public access without authentication type: boolean required: - id - name - createdAt - updatedAt - region - publicAccess BranchMetrics: description: A collection of metrics (cpu, memory, disk,...) for each of the instances of a branch type: object properties: start: type: string format: date-time end: type: string format: date-time results: description: One entry per requested metric, in the order the metrics were requested. type: array items: $ref: '#/components/schemas/BranchMetricResult' required: - start - end - results BranchLogs: description: A collection of logs for each of the instances of a branch type: object properties: start: type: string format: date-time end: type: string format: date-time logs: type: array items: $ref: '#/components/schemas/LogEntry' nextCursor: description: Pagination cursor for the next page type: string nullable: true required: - start - end - logs - nextCursor LogLevel: description: Log level enumeration type: string enum: - debug - info - warning - error RotateCredentialsRequest: description: Request to rotate credentials for a branch database user type: object properties: username: description: Database username to rotate credentials for type: string required: - username BranchMetadata: description: Detailed metadata about a branch, including its status and configuration type: object properties: id: description: Unique identifier for the branch type: string name: description: Human-readable name of the branch type: string description: description: Optional description of the branch purpose or contents type: string createdAt: description: Timestamp when the branch was created type: string format: date-time updatedAt: description: Timestamp when the branch was last updated type: string format: date-time parentID: description: Identifier of the parent branch if this is a derived branch, null otherwise type: string nullable: true region: description: Geographic region where the branch is deployed type: string status: $ref: '#/components/schemas/BranchStatus' connectionString: description: Database connection string for accessing this branch type: string nullable: true publicAccess: description: Whether the branch allows public access without authentication type: boolean backupsEnabled: description: Whether the branch is in a region that supports backups type: boolean scaleToZero: $ref: '#/components/schemas/ScaleToZeroConfiguration' configuration: $ref: '#/components/schemas/ClusterConfiguration' backupConfiguration: $ref: '#/components/schemas/BackupConfiguration' required: - id - name - createdAt - updatedAt - region - status - connectionString - configuration - publicAccess - backupsEnabled - scaleToZero LogFilter: description: A single filter on log entries. type: object properties: field: description: Log attribute to filter on. type: string enum: - instance - level - process - body op: description: Match operator. type: string enum: - in - contains - icontains - regex - iregex values: description: 'Used with `op: in`.' type: array items: type: string value: description: Used with the body operators. type: string required: - field - op ClusterConfiguration: description: Configuration details for a database cluster backing a branch type: object properties: region: description: Geographic region where the cluster will be deployed type: string storage: description: Branch storage in GiB (gigabytes) type: integer format: int32 maximum: 250 instanceType: description: The instance type according to the xata instance types available type: string image: description: PostgreSQL image to use for the database instances type: string replicas: description: Number of replicas in the branch. Every child branch is created with no replicas. This can be updated. type: integer format: int32 maximum: 4 minimum: 0 postgresConfigurationParameters: description: Arbitrary PostgreSQL configuration parameters for the cluster type: object additionalProperties: type: string preloadLibraries: description: List of PostgreSQL extensions and libraries to preload type: array items: type: string required: - image - region - instanceType - replicas BranchLogsRequest: type: object properties: start: description: Start time type: string format: date-time end: description: End time type: string format: date-time filters: description: Filters applied to log entries. Multiple filters are combined with AND. type: array items: $ref: '#/components/schemas/LogFilter' limit: type: integer default: 100 maximum: 200 minimum: 1 cursor: description: Pagination cursor from a previous response type: string required: - start - end MetricSeries: description: The metric series type: object properties: instanceID: description: ID of the instance type: string aggregation: description: The aggregation used to generate this time-series type: string enum: - avg - max - min values: type: array items: type: object properties: timestamp: type: string format: date-time value: type: number required: - timestamp - value required: - instanceID - aggregation - values PostgresConfigDetails: description: Detailed information about PostgreSQL configuration parameters for a branch type: object properties: parameters: description: Array of PostgreSQL configuration parameters with detailed information items: $ref: '#/components/schemas/PostgresConfigParameter' type: array required: - parameters BranchUpdateDetails: description: Details that can be updated for an existing branch type: object properties: name: description: New name for the branch type: string description: description: New description for the branch (max 50 characters) type: string maximum: 50 pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9- ]*$ replicas: description: Number of database replicas to scale to type: integer format: int32 maximum: 4 minimum: 0 storage: description: Branch storage in GiB (gigabytes) type: integer format: int32 maximum: 250 instanceType: description: New instance type for the branch type: string backupConfiguration: $ref: '#/components/schemas/BackupConfiguration' hibernate: description: Enabled when the branch should be hibernated, disabled if it needs to be reactivated. type: boolean scaleToZero: $ref: '#/components/schemas/ScaleToZeroConfiguration' postgresConfigurationParameters: description: Arbitrary PostgreSQL configuration parameters for the cluster type: object additionalProperties: type: string preloadLibraries: description: List of PostgreSQL extensions and libraries to preload type: array items: type: string image: description: PostgreSQL image to use for the database instances type: string PostgresConfigParameter: description: Detailed information about a single PostgreSQL configuration parameter type: object properties: name: description: The name of the PostgreSQL parameter type: string type: description: The data type of the parameter type: string enum: - string - int - float - bytes - enum - duration - boolean description: description: Human-readable description of what the parameter controls type: string section: description: The section/category this parameter belongs to type: string acceptableRange: description: Information about the acceptable range of values for this parameter type: object properties: minValue: description: Minimum allowed value (if applicable) type: string maxValue: description: Maximum allowed value (if applicable) type: string enumValues: description: List of allowed enum values (if applicable) type: array items: type: string defaultValue: description: The default value for this parameter type: string defaultValueSource: description: The source of the default value type: string enum: - postgres - instance_type currentValue: description: The current value of this parameter in the branch type: string documentationLink: description: Link to PostgreSQL documentation for this parameter type: string recommendation: description: Optional recommendation for this parameter (currently empty) type: string restartRequired: description: Whether a database restart is required for this parameter change to take effect type: boolean required: - name - type - description - defaultValue - defaultValueSource - currentValue - documentationLink - recommendation - section ClusterLifecycle: description: Information about the current lifecycle state of a database cluster type: object properties: state: description: Current operational state of the cluster (ready, creating, updating, etc.) enum: - ready - creating - updating - upgrading - unknown title: Current state in the cluster lifecycle reason: description: Reason for the current lifecycle state, especially useful for non-ready states type: string phase: description: Current phase within the lifecycle process type: string deprecated: true required: - state - phase ScaleToZeroConfiguration: description: Configuration for scaling branches to zero when not in use type: object properties: enabled: description: Whether scale to zero is enabled type: boolean inactivityPeriodMinutes: description: Duration in minutes after which branches will be hibernated if not accessed type: integer default: 30 required: - enabled - inactivityPeriodMinutes BranchMetricName: description: Name of a branch metric exposed by the API. type: string enum: - cpu - memory - disk - connections_active - connections_idle - network_ingress - network_egress - iops_read - iops_write - latency_read - latency_write - throughput_read - throughput_write - wal_sync_time - replication_lag_time LogEntry: type: object properties: timestamp: type: string format: date-time instanceID: type: string level: $ref: '#/components/schemas/LogLevel' message: type: string process: description: Name of the PostgreSQL process that emitted the log type: string required: - timestamp - instanceID - message BranchFromParent: type: object properties: mode: type: string enum: - inherit parentID: description: If present, the branch will inherit the parent branch configuration and data type: string required: - mode - parentID BranchCreationDetails: description: Details required when creating a new branch type: object properties: name: description: Human-readable name for the new branch type: string description: description: Optional description for the branch purpose or contents (max 50 characters) type: string maxLength: 50 pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9- ]*$ scaleToZero: $ref: '#/components/schemas/ScaleToZeroConfiguration' backupConfiguration: $ref: '#/components/schemas/BackupConfiguration' mode: description: The mode used to discriminate between types of branches. type: string enum: - inherit - custom discriminator: propertyName: mode mapping: inherit: '#/components/schemas/BranchFromParent' custom: '#/components/schemas/BranchFromConfiguration' oneOf: - $ref: '#/components/schemas/BranchFromParent' - $ref: '#/components/schemas/BranchFromConfiguration' required: - name - mode OrganizationID: title: OrganizationID type: string pattern: '[a-zA-Z0-9_-~:]+' x-oapi-codegen-extra-tags: validate: identifier BranchMetricsRequest: type: object properties: start: description: Start time type: string format: date-time end: description: End time type: string format: date-time metrics: description: List of metric names to query. type: array items: $ref: '#/components/schemas/BranchMetricName' maxItems: 15 minItems: 1 instances: description: List of instance IDs to query type: array items: type: string aggregations: description: List of aggregations to get, this is how the data-points within the interval are aggregated. Each one will generate a separate time-series per metric in the response. type: array items: type: string enum: - avg - max - min required: - start - end - metrics - aggregations BackupConfiguration: description: Details about the branch continuous backup configuration type: object properties: retentionPeriod: description: how long are we keeping the backups around for type: integer format: int32 default: 2 maximum: 35 minimum: 2 backupTime: description: time of day/week when we are taking a full backup type: string pattern: ^(\*|[0-6]):(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])$ x-excluded: true x-internal: true InstanceStatus: description: Status information about an individual database instance within a cluster type: object properties: id: description: Unique identifier for the database instance type: string title: Instance unique ID status: description: Current operational status of the instance type: string title: Current status of the instance primary: description: Indicates if this instance is currently the primary (write) instance type: boolean title: Whether the instance is the primary targetPrimary: description: Indicates if this instance is the target primary during a failover operation type: boolean title: Whether the cluster is switching and this is the target primary required: - id - status - primary - targetPrimary title: Status of an instance in the cluster responses: PreconditionFailedError: description: Error response when a precondition for the request is not met content: application/json: schema: type: object properties: id: description: Error identifier for tracking and debugging type: string message: description: Human-readable error message explaining the precondition failure type: string required: - message GenericError: description: Generic error response for most error conditions content: application/json: schema: type: object properties: id: description: Error identifier for tracking and debugging type: string message: description: Human-readable error message explaining the issue type: string required: - message AuthorizationError: description: Error response when authentication or authorization fails content: application/json: schema: type: object properties: id: description: Error identifier for tracking and debugging type: string message: description: Human-readable error message explaining the authentication or authorization issue type: string required: - message securitySchemes: oidc: type: openIdConnect openIdConnectUrl: https://auth.xata.io/realms/xata/.well-known/openid-configuration apiKey: type: apiKey in: header name: Authorization description: 'API key authentication using Bearer token format: Bearer ' xata: type: oauth2 flows: implicit: authorizationUrl: https://auth.xata.io/realms/xata/protocol/openid-connect/auth scopes: org:read: Read organization information org:write: Create and modify organizations keys:read: Read API keys keys:write: Create and manage API keys project:read: Read project information project:write: Create and modify projects branch:read: Read branch information branch:write: Create and modify branches metrics:read: Read metrics data logs:read: Read logs data credentials:read: Read credentials credentials:write: Rotate credentials marketplace:write: Register with cloud marketplaces branchConnectionString: type: apiKey in: header name: Connection-String description: Branch PostgreSQL connection string (`postgres://user:pass@{branch}.{region}.xata.tech/db`), including the embedded password. The hostname selects the target branch, region, and endpoint type (the `-rw`/`-ro` suffix, see `EndpointType`), and must match the request host. Obtain it from the Xata dashboard or the control-plane API. This is the only credential the gateway accepts; the control-plane API key (Bearer token) is rejected here. For the WebSocket endpoint (`GET /v2`) the same connection string is conveyed via the PostgreSQL startup message instead of this header. externalDocs: url: https://xata.io/docs/api x-tagGroups: - name: Authentication API tags: - Organizations - Users - API Keys - Marketplace - Billing - Webhooks - name: Gateway API tags: - Gateway - name: Projects API tags: - Projects Webhooks - Projects - Branches - GitHub App - Metrics - Logs