Chelabase
ManagementRoles

Preview a role delete

GET
/v1/databases/{id}/branches/{branch_id}/roles/{role}/delete-preview

What deleting the role to successor would expose: its SECURITY DEFINER routines granted to roles other than the successor, and its views without security_invoker (and materialized views) granted to anyone but the successor, PUBLIC included. After the delete they run with the successor's rights for those roles. Review them, then pass confirm to the delete; a delete to a named successor that exposes something is refused without the current token (exposure_unconfirmed). chelabase_orphaned (the default) never needs one: its preview lists what it finds with confirm: null. Changes nothing. The delete's rules for the role and the successor apply.

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Database id

Formatuuid
branch_id*string

Branch id

Formatuuid
role*string

Role name

Query Parameters

successor?string

The successor the delete would name, with the delete's rules; chelabase_orphaned (the default) when omitted.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles/string/delete-preview"
{  "confirm": "string",  "exposures": [    {      "database": "string",      "grantees": [        "string"      ],      "identity": "string",      "kind": "function"    }  ],  "successor": "string"}