Resolve the branch to use
https://{your-workspace-slug}.{region}.xata.sh/dbs/db_name/resolveBranch
This endpoint is typically used by the Xata SDKs to resolve the correct branch to use in a particular situation. The main input is the git branch.
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_name | The Database Name | path | ✅ | string |
Resolve a Git Branch to a Xata Branch
GEThttps://{your-workspace-slug}.{region}.xata.sh/dbs/db_name/resolveBranch
Failed to compile MDX
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
gitBranch | The Git Branch | query | - | string |
fallbackBranch | Default branch to fallback to | query | - | string |
Responses
{
"branch": "main",
"reason": {
"code": "DEFAULT_BRANCH",
"message": "Default branch for this database (main)"
}
}
type ResolveBranch = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type ResolveBranch = void;
type ResolveBranch = void;