Move the branch to a different cluster
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/move
This path allows moving the branch to a different cluster, the destination cluster is specified in the request.
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern | path | ✅ | string |
Get Branch Move Status
GEThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/move
Get the branch move status (if a move is happening)
Responses
type GetBranchMoveStatus = {
state: string;
pendingBytes: number;
};
type GetBranchMoveStatus = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type GetBranchMoveStatus = {
id?: string;
message: string;
};
type GetBranchMoveStatus = void;
type GetBranchMoveStatus = void;
Move the Branch to a Different Cluster
PUThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/move
Request Body Type Definition
type MoveBranch = Record<string, any>;
/**
* Xata Table Record Metadata
*/
type Record = RecordMeta & {
[key: string]: any;
};
/**
* Xata Table Record Metadata
*/
type RecordMeta = {
id: RecordID;
xata: {
/**
* The record's version. Can be used for optimistic concurrency control.
*/
version: number;
/**
* The time when the record was created.
*/
createdAt?: string;
/**
* The time when the record was last updated.
*/
updatedAt?: string;
/**
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
*/
table?: string;
/**
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
*/
highlight?: {
[key: string]: string[] | {
[key: string]: any;
};
};
/**
* The record's relevancy score. This is returned by the search APIs.
*/
score?: number;
/**
* Encoding/Decoding errors
*/
warnings?: string[];
};
} | {
xata_id: RecordID;
/**
* The record's version. Can be used for optimistic concurrency control.
*/
xata_version: number;
/**
* The time when the record was created.
*/
xata_createdat?: string;
/**
* The time when the record was last updated.
*/
xata_updatedat?: string;
/**
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
*/
xata_table?: string;
/**
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
*/
xata_highlight?: {
[key: string]: string[] | {
[key: string]: any;
};
};
/**
* The record's relevancy score. This is returned by the search APIs.
*/
xata_score?: number;
/**
* Encoding/Decoding errors
*/
xata_warnings?: string[];
};
/**
* @maxLength 255
* @minLength 1
* @pattern [a-zA-Z0-9_-~:]+
*/
type RecordID = string;
Responses
type MoveBranch = {
state: string;
};
type MoveBranch = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type MoveBranch = {
id?: string;
message: string;
};
type MoveBranch = {
id?: string;
message: string;
};
type MoveBranch = void;
type MoveBranch = void;