Databases

https://api.xata.io/workspaces/workspace_id/dbs

This path contains operations that can be performed on databases within Xata.

Expected Parameters

NameDescriptionInRequiredSchema
workspace_idWorkspace IDpathstring

List Databases

GET
https://api.xata.io/workspaces/workspace_id/dbs

List all databases available in your Workspace.

Status CodeDescriptionExample Response/Type Definition
200OK
type GetDatabaseList = {
    /*
     * A list of databases in a Xata workspace
     */
    databases: DatabaseMetadata[];
};

/**
 * Metadata of databases
 */
type DatabaseMetadata = {
    /*
     * The machine-readable name of a database
     */
    name: string;
    /*
     * Region where this database is hosted
     */
    region: string;
    /*
     * The time this database was created
     */
    createdAt: DateTime;
    /*
     * Metadata about the database for display in Xata user interfaces
     */
    ui?: {
        /*
         * The user-selected color for this database across interfaces
         */
        color?: string;
    };
};

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