Chelabase
ManagementFunctions

Turn a function's trigger on the branch on or off

PATCH
/v1/databases/{id}/branches/{branch_id}/functions/{name}/triggers/{trigger_id}

Turning a table trigger off uninstalls it from the database and drops its queued events; turning it on installs it again (pending_install).

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Database id

Formatuuid
branch_id*string

Branch id

Formatuuid
name*string

Function name

trigger_id*string

Trigger id

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

enabled*boolean

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/functions/string/triggers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
{  "bucket": "string",  "dead_count": 0,  "dropped_count": 0,  "enabled": true,  "events": [    "string"  ],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "last_delivered_at": "2019-08-24T14:15:22Z",  "last_delivery_error": "string",  "last_error": "string",  "pg_database": "string",  "prefix": "string",  "schema": "string",  "source": "table",  "state": "string",  "table": "string"}