Skip to main content

Events REST reference

Endpoints for listing events and managing subscriptions. TaruviBase fires events itself; there is no endpoint to publish one.

Authentication#

Every endpoint requires a credential — see Authentication and authorization. Subscribing, unsubscribing, and listing an app's subscribers also require an organization owner or admin, or another cloud user with access to the site.

List events#

Any signed-in caller can list the event names.

GET /api/cloud/events/
{"status": "success", "data": {"events": ["PRE_USER_CREATE", "RECORD_CREATE"]}}

Returns 200, with the event names in data.events.

Subscribe#

Subscribes a function to an event. Needs cloud access.

POST /api/cloud/events/{event_name}/subscribe/
{"function_id": 42}
  • event_name (path, required) — An event type, matched exactly, including case.
  • function_id (body, required) — The integer id of an existing function.

Returns 201 with the subscription's id, event, function, function_name, function_slug, app_name, app_slug, and timestamps.

Unsubscribe#

Removes a subscription. Needs cloud access.

POST /api/cloud/events/{event_name}/unsubscribe/
{"function_id": 42}

Returns 200. If the function isn't subscribed, the request returns 404 NOT_FOUND; see Troubleshooting.

List an app's subscribers#

Lists the app's functions subscribed to one event. Needs cloud access.

GET /api/apps/{app_slug}/events/{event_name}/
{"event": "RECORD_CREATE", "app": {"id": 7, "name": "Orders", "slug": "orders"}, "total_subscribers": 1, "subscribers": ["…"]}

Returns 200 with:

  • event — The event name.
  • app — {id, name, slug}.
  • total_subscribers — The number of this app's subscribed functions.
  • subscribers — One entry per subscribed function, with subscriber_id, event, function_id, function_name, function_slug, filter_conditions, app identifiers, and created_at.

It fails with 404 for an unknown app slug, 400 for a name that isn't an event type, and 403 when the caller doesn't have cloud access.