DELETE
/functions/{name}/triggers/{triggerId}Delete Function Trigger
Permanently removes the EVENT trigger triggerId from the named function, so writes to its collection no longer invoke the function.
A scheduled trigger's id is 404 K9O_TRIGGER_NOT_FOUND here; delete schedules with DELETE /@{projectSlug}/forge/schedules/{trgId}.
Requires PROJECT_ADMIN.
Parameters
| name * | path | The function's name. A module's operation is named |
| triggerId * | path | The trigger's id, a UUID. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 204 | The trigger was deleted. No body. | |
| 400 | K9O_INVALID_FIELD_VALUE | The project slug, the function name or the trigger id is not a valid identifier. |
| 401 | K9O_UNAUTHENTICATED | The caller presented no authenticated session. |
| 403 | K9O_ACCESS_DENIED | The caller has no access to this project. |
| 403 | K9O_IAM_POLICY_DENIED | The bound IAM policy ceiling denies deleting function triggers; the default floor is PROJECT_ADMIN. |
| 404 | K9O_FUNCTION_NOT_FOUND | No function with that name exists in this project, or it is retired. |
| 404 | K9O_TRIGGER_NOT_FOUND | No event trigger with that id is attached to this function (a scheduled trigger's id is not found here). |
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.functions.triggers.delete('greet', '3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90')Showing example in TypeScript