Delete a branch
Authorization
bearer In: header
Path Parameters
Database id
uuidBranch id
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "status": "string"}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.
Reveal a branch's connection details GET
The connection details of the branch's owner, or of the role named by `role`, for its main database or the one named by `database`. `password` is null, with the reason in `password_state`, when it can't be shown: a role whose password was set in SQL (only its hash is stored) or has an MD5 hash the proxy can't use; the `uri` then has no password. Never cached (`Cache-Control: no-store`) and never logged.