Single Database

https://{your-workspace-slug}.{region}.xata.sh/dbs/db_name

Given a parameter db_name, this path allows interacting with a specific database on Xata. Below are a number of operations that can be performed on a given database.

Expected Parameters

NameDescriptionInRequiredSchema
db_nameThe Database Namepathstring

List Branches

GET
https://{your-workspace-slug}.{region}.xata.sh/dbs/db_name

List all available Branches

Status CodeDescriptionExample Response/Type Definition
200OK
type GetBranchList = {
    databaseName: string;
    branches: Branch[];
};

type Branch = {
    name: string;
    createdAt: DateTime;
};

/**
 * @format date-time
 */
type DateTime = string;
400Bad Request
type GetBranchList = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
404Example response
type GetBranchList = {
    id?: string;
    message: string;
};
5XXUnexpected Error
defaultUnexpected Error