Skip to content

Panes

A pane is a saved chart. It sits on the Overview tab of a trigger or of a group and draws exact figures over a time range: events by country, by hour, by a metadata key, and so on.

  • It is attached to one trigger or one group
  • It has a name, a visualization, a dimension (what you count by), an optional second dimension, a range and a width
  • It belongs to your account. Other members of an organization, or people a trigger is shared with, build their own panes on the same trigger. Nobody sees yours
  • Reading and editing panes needs a JWT: an API key cannot touch them (see API Keys)
  • Reading a pane's figures only needs read access to the trigger or group. A viewer of an organization can have panes too

A pane on a group counts the events of all the triggers of the group together. A pane on a trigger counts that trigger only.

The first time you open the Overview (or Explore) tab of a trigger or group you can read, Ostrakon creates a few panes for you:

Pane Visualization Width
Events by country Map Full
When it happens Punch card Half
Events by <field> Bars Half
<field> × <other field> Heatmap Half

The last two only exist when the scope has metadata fields: the first one uses the first field, the second one the first two. A trigger offers its fields in alphabetical order (sampled on its 1000 latest events). A group offers the fields shared by most of its triggers (the first 10 are read). Fields that start with _ (added by the server) and non-scalar values are skipped.

This happens once per account and per trigger or group. A pane you delete never comes back.

  1. Open the Explore tab of a trigger or a group
  2. Pick what to chart:
    • Show: Hour of day, Weekday, Country, or one of your metadata keys
    • Cross with: a second dimension, or None
    • Measure: Count of events, or the Sum of a numeric metadata key (shown when your events carry one)
    • As: the visualization
    • Range: Follow the page, or a fixed 1h, 6h, 24h, 7d or 30d
    • Name: optional, the pane gets an automatic title without it
  3. The chart updates as you go. Click Pin to add it to the Overview, at the end of the list

The visualizations offered depend on the dimensions:

Selection Visualizations
One dimension Bars, Donut, Punch card, Table, Line
Country alone Map, Bars, Line, Donut, Table
With Cross with Heatmap, Stacked bars

With a sum, the figures are the sum of the key per value (not whole numbers), and the Map is not offered: it only counts events.

Follow the page means the pane reads the range selected at the top of the page. A fixed range stays whatever the page shows, and the card carries a badge such as 24h · fixed.

The web interface cannot filter a pane on metadata values. A pane whose filters were set through the API keeps them when you edit it.

Terminal window
curl -X POST https://ostrakon.example.com/api/v1/panes \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scope_type": "trigger",
"scope_id": "{triggerId}",
"name": "Signups by plan",
"config": {
"viz": "donut",
"dimension": "plan",
"interval": "1d"
}
}'

scope_type is trigger or group. In config, viz, dimension and interval are required.

Field Values
viz heatmap, punchcard, map, bars, donut, cols, line, table, stack
dimension, cross hour, weekday, @country or a metadata key (128 characters max)
range 1h, 6h, 24h, 7d, 30d, or absent to follow the page
interval 1m, 5m, 30m, 1h, 6h, 1d
measure count (default, or absent) or sum:<metadata key> (128 characters max)
filters An object, 3 levels deep at most

The name is required (100 characters max), the whole config must stay under 16 KB. A 400 names the invalid part, 403 means you cannot read the trigger or group. The web interface picks the interval from the range of the page when you pin and renders cols as bars.

GET /triggers/{id}/panes and GET /groups/{id}/panes list your panes of a scope, GET /panes all your panes (most recently edited first).

On the Overview, each card has:

  • a drag handle to reorder, which also answers to the arrow keys when focused
  • Edit in Explore (or Open), which opens the Explore tab on this pane
  • Full width / Half width, to switch between half and the whole row
  • Delete pane

In Explore, a pane being edited shows Editing: . Change the dimensions, the visualization, the range or the name, then click Update pane. Cancel drops the changes, Delete removes the pane.

Through the API, PATCH /panes/{id} takes name, config and width (half or full, 400 otherwise), only the fields you send change. DELETE /panes/{id} answers 204.

The Overview has two columns on wide screens. A pane takes half a row or a full row. The map starts full width, every other pane starts at half.

Order and width are saved as you change them. On a narrow screen the grid has one column: every pane is full width, the order is kept and the width toggle is hidden.

Terminal window
curl -X PUT https://ostrakon.example.com/api/v1/triggers/{triggerId}/panes/order \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{"pane_ids": ["{paneId1}", "{paneId2}"]}'

PUT /groups/{id}/panes/order does the same for a group. Send the ids in their new order (1 to 100, no duplicates), every id must be one of your panes on that scope or nothing is written (404). The response lists the scope's panes in their new order.

The figures of a pane are exact over the whole range, not a sample of recent events. They come from GET /events/breakdown, which counts events by one dimension, or by two with cross:

Terminal window
curl "https://ostrakon.example.com/api/v1/events/breakdown?trigger_ids={triggerId}&dimension=weekday&cross=hour&tz=Europe/Paris" \
-H "Authorization: Bearer TOKEN"
Parameter Meaning
dimension Required: hour (0 to 23), weekday (1 Monday to 7 Sunday), @country or a metadata key
cross Optional second dimension
tz IANA time zone for hour and weekday, UTC by default
from, to Range, now-1h to now by default, bounded to the last 30 days
filter JSON filter on metadata
limit Values kept per metadata dimension, 20 by default, 50 at most
measure count (default) or sum:<metadata key>: the sum of a numeric key instead of the number of events

The scope is exactly one of owner, scope=all, group_id or trigger_ids (same rules as GET /events). This endpoint also accepts an API key, with trigger:stats on each trigger (see API Keys).

Without cross, you get buckets (key, count) and total. With cross, you get pairs (key, cross_key, count): the punch card is weekday crossed with hour. When the scope holds too many triggers, the web interface shows a Partial badge on the pane.

With measure=sum:<key>, each bucket and pair also carries value (the sum), count is the number of events summed, and the response has total_value. Only events whose key is a JSON number are summed: a missing key, a string or null is ignored. Values come sorted by descending sum. An invalid measure (empty key, unknown prefix) is a 400 with a message. For example, the cost per ticket over 7 days:

Terminal window
curl "https://ostrakon.example.com/api/v1/events/breakdown?trigger_ids={triggerId}&dimension=ticket&measure=sum:cost_usd&from=now-168h" \
-H "Authorization: Bearer TOKEN"

Server keys (starting with _, and @country) cannot be used on a trigger you only read through its public visibility: the answer is 400.

  • A pane lives on a trigger or a group, and shows on the Overview tab of that trigger or group. There is no global page of panes in the app
  • A group pane aggregates its triggers: add or remove triggers in the group (see Groups) and the pane follows
  • A pane on a trigger of an organization works the same way, with your own copy per member (see Organizations (Tenants))
  • The events come from the same data as the other views (see Triggers & Events)
  • Deleting a trigger or a group deletes the panes that target it, for every member who had one, in the same operation (this also holds for the triggers and groups of an organization)

ostra panes lists, creates, updates and deletes panes from the terminal, with a login session (see CLI (ostra)).