Delete a function from the database
Deletes the function with its deployments and every branch's state and secrets, and revokes its run-as keys. A function is the database's, so this needs Admin, and it's refused while a protected branch has the function active.
Authorization
bearer In: header
Path Parameters
Database id
uuidBranch id (any branch of the database)
uuidFunction name
Response Body
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/functions/string"Enable, disable, roll back, or set the auth or run-as role on the branch PATCH
Applies the named fields in this order: `active_deployment_id`, `enabled`, `auth`, `run_as_role`. The run-as role is checked first (as for a secret key: you must be able to use the role; BYPASSRLS needs Admin), before anything is written.
Create a function, or change its kind or its auth on the branch PUT
Creates the function when the database has none of this name (201), else changes what the body names (200). A name is a lowercase letter, then up to 62 of a-z, 0-9 and `-`; `public` is reserved (the keyless invoke prefix). Changing the kind needs Admin and is refused while a protected branch has the function active.