In order to resolve the database branch, the following algorithm is used: * if the `gitBranch` was provided and is found in the git branches mapping, the associated Xata branch is returned * else, if a Xata branch with the exact same name as `gitBranch` exists, return it * else, if `fallbackBranch` is provided and a branch with that name exists, return it * else, return the default branch of the DB (`main` or the first branch) Example call: ```json // GET https://tutorial-ng7s8c.
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |