Create a branch
Branches from parent_branch_id (main when omitted), at at (the parent's present when omitted).
Authorization
bearer In: header
Path Parameters
Database id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "branched_at_lsn": "string", "branched_at_time": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "error": "string", "guard_logins": true, "history_start": "2019-08-24T14:15:22Z", "host": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "normal", "main_database_missing": true, "name": "string", "parent_branch_id": "3db5a2a4-2ef3-448e-8466-d96ce9d42581", "port": 0, "protected": true, "review_acknowledged_hash": "string", "status": "pending"}List a database's branches GET
A flat list; `parent_branch_id` makes the tree.
Protect or unprotect a branch, or switch its login-role guard PATCH
Sets the branch's `protected` flag and its `guard_logins` switch (at least one of them). A protected branch can't be deleted or reset to its parent, and its database can't be deleted, until it is unprotected. Restore still works. Only `normal` branches can be protected, main included. Protecting runs the branch's review (`getBranchReview`) on its running compute: when the review lists anything, `review_hash` must be its current `hash` (else 409 `review_changed` with the current review), and the review is stored as acknowledged. On a protected branch with `guard_logins` on, login roles other than the owner, member logins and the branch's guard exemptions can't change the schema. Every change reconciles the branch's member roles and its guard.