Skip to main content

Events Studio

Events Studio is a console on top of the extension, organised by workspace. A workspace is an event API: one base URL, the brokers behind it, its channels, the keys that call it, the webhooks it pushes to, a console to try it and the dashboards of what goes through it. It takes a minute to go from a broker to an API your callers use, without writing a route by hand.

It is served at /extensions/cloud-apim/events-studio on the backoffice of Otoroshi (Events Studio in the features and the sidebar), for the signed-in user, with their rights.

What a workspace is made of​

The studio stores nothing of its own. A workspace is made of ordinary entities, found back by their events_studio_workspace metadata:

In the studioIn Otoroshi
the workspacea team team_events_studio_<id> and a route route_events_studio_<id>
its base URLthe domain of the route: <slug>.<domain>, or <domain>/<slug> (see the settings below)
its channelsthe channels of the events gateway of the route
its brokersthe connections it owns (in its team), and the ones of the gateway its channels name (shared: shown, never changed nor deleted from the workspace)
its keysapi keys authorized on the route, narrowed to channels and operations by their event_brokers_scopes metadata
its webhookswebhooks reading a channel
its activitythe user analytics of Otoroshi, narrowed to the route (Observability)

The route also carries an ip allow list and block list, a CORS plugin and the consumer preset requiring the keys of the workspace: they are enabled from the settings of the workspace. Everything can be seen, and changed, from the backoffice too.

The pages​

The home lists the workspaces the signed-in user may see, and creates new ones.

The workspaces

Overview​

The base URL, the three steps to a working API, the numbers of the last 24 hours, a quickstart.

The overview of a workspace

API​

Every endpoint of every channel with its snippets (curl, JavaScript, Python), and the AsyncAPI document.

The API of a workspace

Activity​

What went through the API, one tab per theme:

  • Overview: published, consumed, refused, latency, open subscriptions, the busiest api keys, channels and topics.
  • Consumers: by api key. Channels. Topics.
  • Brokers: by connection, kind and Otoroshi node, outages, changes of state.
  • Events: by type of cloudevent and by content type.
  • Access: how events got in and out: http POST, json lines, server-sent events, websocket, request reply, webhooks, exporter, workflows, admin api.
  • Webhooks: read, delivered, retried, given up, dead-lettered.
  • Calls: the http calls of the channels: status, duration, by channel and api key.

The api key, the channel and the broker are picked above the tabs; a click on a row of a breakdown narrows every tab to it (a topic, a type, a content type, an access, a webhook), each filter shown as a chip that removes it. The usage button of the API Keys page opens the activity of its key. Without the user analytics, the live counters of the node.

The activity of a workspace

The events of a workspace, by type and content type

Logs​

The latest calls of the channels, the ones answered with an error, the changes of state of the brokers, narrowed to an api key, a channel or a broker (its channels, for the calls).

The logs of a workspace

Activity and Logs share the toolbar of the other studios: a period (a preset, or from a date and time to another), a reload button with the time of the data shown, an automatic reload (every 10 seconds to every 5 minutes, remembered in the browser with the period) and Export CSV (the activity broken down by any dimension, or bucket by bucket; the logs shown). The filters live in the url: a view can be linked to as it is.

Console​

Publish an event, follow a channel live (server-sent events), peek at what it holds without acking anything, send a request and read its reply. The console calls the events gateway of the route, in process, for the signed-in user: the options and the policy of the channels apply, the scopes of the keys do not. Following a channel reads it like a caller: in a group, or from a queue, it takes its share.

The console

Channels​

Open a channel on a broker: where it reads and writes (topic, queue, stream, address), what callers may do there (publish, subscribe, request reply), the group, the delivery, where to start, the options callers may set and the topics they may name.

The channels of a workspace

Brokers​

Connect Kafka, RabbitMQ, Pulsar, Redis, MQTT or ActiveMQ Artemis (the main settings, or every one of them as json; Full form opens the backoffice), see their state and traffic, the lag of a group.

The brokers of a workspace

API Keys​

Create, disable, reset, delete; what a key may do (every channel, some channels and operations, or rules like eu-*:subscribe), quotas, expiry, and its usage (the chart button opens the activity of the key). Callers send the bearer of a key (Authorization: Bearer otoapk_…): it is shown masked, revealed on demand (every reveal is audited), copied or replaced by a new one. The client secret is never shown.

The api keys of a workspace

Webhooks and settings​

  • Webhooks: push the events of a channel to a URL, structured, binary or raw, signed, retried.
  • Settings: name, slug, keys required or not, browser origin (CORS), ip addresses, deletion.

Deleting a workspace deletes its route first (nothing is served while the rest goes), then its keys, its webhooks and the brokers it owns, then its team. Shared brokers stay.

Settings​

In the danger zone of Otoroshi, Events Studio:

SettingDefault
Events Studio enabledyeswhether the studio is served
Workspaces domainthe domain of Otoroshithe domain the event APIs are exposed on
Workspaces exposuresubdomain<slug>.<domain> or <domain>/<slug>
Public scheme, public portthe ones Otoroshi is exposed onwhat the base URLs show
Default api key quotas10000000the throttling, daily and monthly quotas of a new key

A slug is refused when a route of the gateway already answers on the domain it would take.

Rights​

The studio acts with the rights of the signed-in user, the way the admin API does: a workspace whose route a user cannot read does not exist for them, one they can read they see without changing it. A workspace created by a user who is not an administrator of the organization is in its team and in the teams they can write, so they keep seeing what they create.

Its admin API​

The studio is a front on an admin API of its own, scoped by workspace, under /api/extensions/cloud-apim/extensions/event-brokers/studio (reference). It produces the same entities, so a workspace can be scripted.

curl -X POST 'http://otoroshi-api.oto.tools:8080/api/extensions/cloud-apim/extensions/event-brokers/studio/workspaces' \
-u admin-api-apikey-id:admin-api-apikey-secret -H 'Content-Type: application/json' \
-d '{"name": "Shop events", "slug": "shop"}'