event-definitions

Get Event Definition Series

Return a zero-filled time series for one event definition.

Resolves the definition (org-scoped; foreign/unknown id → 404), reads its event_key, and queries events over [start, end) at the requested granularity for the requested measure, projected into the shared ChartInfo DTO so the frontend ChartView consumes it directly. The single series is named by the event_key; y_label keeps the measure label. An optional contact_ids cohort restricts the series to those contacts.

post/event-definitions/{event_definition_id}/series

Request

  • Base URL: https://api.usepolymorph.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.usepolymorph.com/event-definitions/{event_definition_id}/series
  • Auth: none declared

Path parameters

event_definition_idstring uuid required

Headers

X-Viewer-Timezonestring nullable

Request body

granularity'minutely' | 'hourly' | 'daily' | 'weekly' | 'monthly' required
measure'value_sum' | 'converted_contacts' | 'average' | 'average_per_member' required
startstring date-time required
endstring date-time required
contact_idsstring[] nullable

Response

Successful Response

chart_type'bar' | 'line' | 'area' required
x_labelstring nullable
y_labelstring nullable
series_provisional_lastboolean

Changes

No recorded changes to this operation across all 1 revision of this API.