Rename database

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

Given a parameter db_name, this path allows you to rename your Xata database. When you rename a database all URLs accessing the database have to be updated.

Expected parameters

NameDescriptionInRequiredSchema
workspace_id

Workspace ID

path✅string
db_name

The Database Name

path✅string

Rename Database

POST
https://api.xata.io/workspaces/workspace_id/dbs/db_name/rename

Change the name of an existing database

Request Body Type Definition

type RenameDatabase = {
    /**
     * @minLength 1
     */
    newName: string;
};

Responses

/**
 * Metadata of databases
 */
type RenameDatabase = {
    /**
     * 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;