Branch Metadata
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/metadataThis path allows interacting with the metadata of a specific database branch.
Expected parameters
| Name | Description | In | Required | Schema |
|---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern | path | ✅ | string |
Update Branch Metadata
PUThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/metadataUpdate the branch metadata
Request Body Type Definition
type UpdateBranchMetadata = BranchMetadata;
/**
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
*/
type BranchMetadata = {
/**
* @minLength 1
*/
repository?: string;
branch?: BranchName;
/**
* @minLength 1
*/
stage?: string;
labels?: string[];
};
/**
* @maxLength 255
* @minLength 1
* @pattern [a-zA-Z0-9_\-~]+
*/
type BranchName = string;Responses
type UpdateBranchMetadata = void;type UpdateBranchMetadata = {
id?: string;
message: string;
};{
"message": "invalid API key"
}type UpdateBranchMetadata = {
id?: string;
message: string;
};type UpdateBranchMetadata = void;type UpdateBranchMetadata = void;Get Branch Metadata
GEThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/metadataResponses
{
"repository": "github.com/my/repository",
"branch": "feature-login",
"stage": "testing",
"labels": [
"epic-100"
]
}type GetBranchMetadata = {
id?: string;
message: string;
};{
"message": "invalid API key"
}type GetBranchMetadata = {
id?: string;
message: string;
};type GetBranchMetadata = void;type GetBranchMetadata = void;