Event Streams API
Query platform events, view aggregated metrics and dashboards, explore correlated event traces, and stream events in real time. Event payloads are projected to a metadata-only summary at ingest.
/api/v1/event-streamsEvents
Browse, filter, and retrieve individual platform events. At ingest each event is projected to a metadata-only summary, so the stored payload carries identifiers and lightweight metadata rather than the full original event body.
/api/v1/event-streams/companies/{company_id}/eventsList Events
Paginated list of platform events for a company with optional filters by source, type, actor, correlation chain, and time range.
Bearer token required. Permission: event-streams:events:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
source | string | Filter by service source: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute |
event_type | string | Exact event type slug |
event_type_prefix | string | Event type prefix match |
actor_id | string | Filter by actor UUID |
actor_type | string | Filter by actor type |
correlation_id | string | Filter by correlation chain |
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
search | string | Case-insensitive event type substring match |
limit | integer | Results per page (1–200)Default: 50 |
offset | integer | Pagination offset (≥ 0)Default: 0 |
sort | string | Sort order: timestamp_desc or timestamp_ascDefault: timestamp_desc |
Response Fields
| Name | Type | Description |
|---|---|---|
items* | EventItem[] | Matching events |
total* | integer | Total matching events |
limit* | integer | Page size used |
offset* | integer | Offset used |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/events?source=iam&limit=10" \
-H "Authorization: Bearer {token}"Response
200 OK{
"items": [
{
"id": "ev_01abc123-4567-4890-abcd-ef0123456789",
"event_type": "iam.user.created",
"source": "iam",
"company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
"actor_id": "u9000000-0000-4000-8000-000000000001",
"actor_type": "member",
"correlation_id": "corr_01aaa-bbb-ccc-ddd-eee",
"payload": {
"resource_type": "user",
"resource_id": "u1234567-89ab-4cde-f012-3456789abcde"
},
"timestamp": "2026-04-14T10:30:00Z"
}
],
"total": 1,
"limit": 10,
"offset": 0
}/api/v1/event-streams/companies/{company_id}/events/{event_id}Get Event
Retrieve a single event by ID.
Bearer token required. Permission: event-streams:events:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
event_id* | string | Event ID |
Response Fields
| Name | Type | Description |
|---|---|---|
id* | string | Event ID |
event_type* | string | Event type slug |
source* | string | Originating service |
company_id* | string | Company ID |
actor_id* | string | null | Actor who triggered the event, or null |
actor_type* | string | null | Actor type, or null |
correlation_id* | string | null | Correlation chain ID, or null |
payload* | object | Metadata-only projection captured at ingest (identifiers and lightweight metadata; not the full original event body) |
timestamp* | string (ISO 8601) | Event time |
curl https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/events/{event_id} \
-H "Authorization: Bearer {token}"Response
200 OK{
"id": "ev_01abc123-4567-4890-abcd-ef0123456789",
"event_type": "iam.user.created",
"source": "iam",
"company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
"actor_id": "u9000000-0000-4000-8000-000000000001",
"actor_type": "member",
"correlation_id": "corr_01aaa-bbb-ccc-ddd-eee",
"payload": {
"resource_type": "user",
"resource_id": "u1234567-89ab-4cde-f012-3456789abcde"
},
"timestamp": "2026-04-14T10:30:00Z"
}/api/v1/event-streams/event-typesList Event Type Catalog
Catalog of all known event types across services.
Bearer token required. Permission: event-streams:events:view
Query Parameters
| Name | Type | Description |
|---|---|---|
source | string | Filter by service source |
Response Fields
| Name | Type | Description |
|---|---|---|
[]* | EventTypeCatalogItem[] | Event type catalog entries |
curl "https://platform.ergondata.ai/api/v1/event-streams/event-types?source=iam" \
-H "Authorization: Bearer {token}"Response
200 OK[
{
"slug": "iam.user.created",
"source": "iam",
"name": "User Created",
"description": "A new user was added to the organisation."
},
{
"slug": "iam.role.assigned",
"source": "iam",
"name": "Role Assigned",
"description": "A role was assigned to a member."
}
]Metrics
Aggregated event metrics including the metric catalog, batch metric queries, summaries, time series, and top-N breakdowns.
/api/v1/event-streams/companies/{company_id}/metrics/catalogGet Metrics Catalog
Retrieve the full catalog of available metrics with their types, categories, and backing event types.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
source | string | Filter by service source |
Response Fields
| Name | Type | Description |
|---|---|---|
[]* | MetricCatalogItem[] | Available metrics |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/catalog?source=iam" \
-H "Authorization: Bearer {token}"Response
200 OK[
{
"id": "global.total_events",
"source": null,
"name": "Total Events",
"description": "Total number of events across all sources.",
"metric_type": "counter",
"event_types": ["*"],
"category": "overview",
"icon": "activity"
},
{
"id": "global.event_volume",
"source": null,
"name": "Event Volume",
"description": "Event count over time bucketed by granularity.",
"metric_type": "timeseries",
"event_types": ["*"],
"category": "overview",
"icon": "bar-chart"
}
]/api/v1/event-streams/companies/{company_id}/metrics/queryQuery Metrics
Batch-query one or more metrics by ID with optional time range, granularity, and filters.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
metric_ids* | string[] | List of metric IDs from the catalog |
time_from | string (ISO 8601) | Time range start; defaults to 7 days ago |
time_to | string (ISO 8601) | Time range end; defaults to now |
granularity | string | hour, day, or weekDefault: day |
source | string | Filter by service source |
event_type | string | Filter by event type |
Response Fields
| Name | Type | Description |
|---|---|---|
results* | MetricResult[] | One result per requested metric |
time_range* | object | Effective time range as a map of bound name to ISO 8601 timestamp or null |
curl -X POST https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/query \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"metric_ids": ["global.total_events", "global.event_volume"],
"granularity": "day"
}'Response
200 OK{
"results": [
{
"metric_id": "global.total_events",
"metric_type": "counter",
"value": 12847,
"buckets": null,
"items": null,
"numerator": null,
"denominator": null
},
{
"metric_id": "global.event_volume",
"metric_type": "timeseries",
"value": null,
"buckets": [
{ "bucket": "2026-04-07T00:00:00Z", "count": 1823, "source": null },
{ "bucket": "2026-04-08T00:00:00Z", "count": 1956, "source": null },
{ "bucket": "2026-04-09T00:00:00Z", "count": 1742, "source": null }
],
"items": null,
"numerator": null,
"denominator": null
}
],
"time_range": {
"from": "2026-04-07T00:00:00Z",
"to": "2026-04-14T00:00:00Z"
}
}/api/v1/event-streams/companies/{company_id}/metrics/summaryGet Summary
High-level event counts and breakdown by source for the given time range.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
source | string | Filter by service source: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute |
Response Fields
| Name | Type | Description |
|---|---|---|
total_events* | integer | Total event count |
events_by_source* | object | Map of source to event count |
active_actors* | integer | Distinct actors in the range |
time_range* | object | Effective from/to range as a map of bound name to ISO 8601 timestamp or null |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/summary?from=2026-04-07T00:00:00Z" \
-H "Authorization: Bearer {token}"Response
200 OK{
"total_events": 12847,
"events_by_source": {
"iam": 3210,
"workflows": 5102,
"channels": 1845,
"agents": 1290,
"worksheets": 980,
"buckets": 420
},
"active_actors": 47,
"time_range": {
"from": "2026-04-07T00:00:00Z",
"to": "2026-04-14T00:00:00Z"
}
}/api/v1/event-streams/companies/{company_id}/metrics/timeseriesGet Timeseries
Zero-filled time series of event counts bucketed by granularity.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
granularity | string | hour, day, or weekDefault: day |
source | string | Filter by service source |
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
Response Fields
| Name | Type | Description |
|---|---|---|
buckets* | TimeseriesBucket[] | Zero-filled time series |
granularity* | string | Granularity used |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/timeseries?granularity=hour&source=workflows" \
-H "Authorization: Bearer {token}"Response
200 OK{
"buckets": [
{ "bucket": "2026-04-14T08:00:00Z", "count": 142, "source": "workflows" },
{ "bucket": "2026-04-14T09:00:00Z", "count": 238, "source": "workflows" },
{ "bucket": "2026-04-14T10:00:00Z", "count": 185, "source": "workflows" }
],
"granularity": "hour"
}/api/v1/event-streams/companies/{company_id}/metrics/top-event-typesTop Event Types
Most frequently occurring event types ranked by count.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
source | string | Filter by service source |
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
limit | integer | 1–50Default: 10 |
Response Fields
| Name | Type | Description |
|---|---|---|
items* | TopItem[] | Ranked event types |
total* | integer | Total distinct event types |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/top-event-types?limit=5" \
-H "Authorization: Bearer {token}"Response
200 OK{
"items": [
{ "key": "workflows.item.updated", "label": "Item Updated", "count": 3214 },
{ "key": "iam.user.logged_in", "label": "User Logged In", "count": 2870 },
{ "key": "channels.message.received", "label": "Message Received", "count": 1503 },
{ "key": "agents.conversation.created", "label": "Conversation Created", "count": 982 },
{ "key": "worksheets.row.created", "label": "Row Created", "count": 741 }
],
"total": 48
}/api/v1/event-streams/companies/{company_id}/metrics/top-actorsTop Actors
Most active actors ranked by event count.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
limit | integer | 1–50Default: 10 |
Response Fields
| Name | Type | Description |
|---|---|---|
items* | TopItem[] | Ranked actors |
total* | integer | Total distinct actors |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/top-actors?limit=5" \
-H "Authorization: Bearer {token}"Response
200 OK{
"items": [
{ "key": "u9000000-0000-4000-8000-000000000001", "label": "Alice Johnson", "count": 1842 },
{ "key": "u9000000-0000-4000-8000-000000000002", "label": "Bob Smith", "count": 1356 },
{ "key": "ak_svc_automation", "label": "Automation API Key", "count": 1102 },
{ "key": "u9000000-0000-4000-8000-000000000003", "label": "Carol Davis", "count": 890 },
{ "key": "u9000000-0000-4000-8000-000000000004", "label": "Dan Lee", "count": 654 }
],
"total": 47
}/api/v1/event-streams/companies/{company_id}/metrics/sources/{source}Source Breakdown
Detailed breakdown for a single service source including top event types and recent trend.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
source* | string | Service name: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute |
Query Parameters
| Name | Type | Description |
|---|---|---|
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
Response Fields
| Name | Type | Description |
|---|---|---|
source* | string | Service name |
total_events* | integer | Total events for this source |
event_types* | TopItem[] | Top event types for this source |
recent_trend* | TimeseriesBucket[] | Recent event trend |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/sources/workflows" \
-H "Authorization: Bearer {token}"Response
200 OK{
"source": "workflows",
"total_events": 5102,
"event_types": [
{ "key": "workflows.item.updated", "label": "Item Updated", "count": 3214 },
{ "key": "workflows.item.created", "label": "Item Created", "count": 1020 },
{ "key": "workflows.route.executed", "label": "Route Executed", "count": 868 }
],
"recent_trend": [
{ "bucket": "2026-04-12T00:00:00Z", "count": 723, "source": "workflows" },
{ "bucket": "2026-04-13T00:00:00Z", "count": 698, "source": "workflows" },
{ "bucket": "2026-04-14T00:00:00Z", "count": 412, "source": "workflows" }
]
}Metrics Workspace
Run bounded registry-backed analytics, save versioned dashboards, and create asynchronous CSV or JSON exports. Workflow lifecycle analytics contains identifiers and timestamps only.
/api/v1/event-streams/companies/{company_id}/metrics/dimensionsList Analytics Dimensions
Return the semantic business-metric catalog plus allowlisted datasets, dimensions, measures, and operators accepted by typed analytics queries.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Response Fields
| Name | Type | Description |
|---|---|---|
datasets* | AnalyticsDataset[] | Allowlisted datasets and fields |
operators* | object | Allowlisted filter operators |
metrics* | BusinessMetricOption[] | Business subjects, grains, units, and readiness states |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/dimensions" -H "Authorization: Bearer {token}"Response
200 OK{"metrics":[{"id":"workflow.phase.dwell","name":"Phase duration","subject":"phase_visits","grain":"interval","unit":"seconds","status":"available"}],"datasets":[{"id":"workflow_lifecycle","name":"Workflow lifecycle","dimensions":[],"measures":[]}],"operators":{"eq":"Equals"}}/api/v1/event-streams/companies/{company_id}/metrics/labelsResolve Metric Labels
Resolve durable workflow and phase names from the label projection, including deleted or renamed entities. Use this when the live workflows API no longer has the entity.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
ids* | string | Comma-separated workflow or phase UUIDs, at most 200 |
Response Fields
| Name | Type | Description |
|---|---|---|
labels* | MetricLabel[] | Company-scoped names for the requested entity IDs |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/labels?ids={uuid}" -H "Authorization: Bearer {token}"Response
200 OK{"labels":[{"entity_type":"phase","entity_id":"11111111-1111-1111-1111-111111111111","name":"Closed intake","workflow_id":"22222222-2222-2222-2222-222222222222","deleted_at":"2026-08-01T00:00:00Z"}]}/api/v1/event-streams/companies/{company_id}/metrics/executeExecute Typed Analytics Query
Execute a bounded business metric query. The planner resolves the metric to its fact projection and grain; legacy dataset requests remain compatible.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
metric | string | Semantic metric ID such as workflow.phase.dwell or workflow.items.routed |
dataset | event_facts | workflow_lifecycle | Legacy registered dataset; inferred from metric when omitted |
filters | QueryFilter[] | Up to 20 allowlisted filters |
measures* | QueryMeasure[] | Occurrences, distinct counts, or dwell aggregations (avg, min, max, p50-p99) |
group_by | string[] | Up to 3 registered dimensions |
funnel | FunnelStep[] | Ordered lifecycle steps |
Response Fields
| Name | Type | Description |
|---|---|---|
query_id* | string | Deterministic identifier for the normalized query |
columns* | MetricQueryColumn[] | Typed result-column metadata |
rows* | object[] | Compact result rows |
summary* | MetricQuerySummary | Row, truncation, and warning summary |
warnings* | string[] | Open/late/invalid, truncation, or diagnostic warnings |
provenance* | QueryProvenance | Normalized effective query |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/execute" \
-H "Authorization: Bearer {token}" -H "Content-Type: application/json" \
-d '{"metric":"workflow.phase.dwell","dataset":"workflow_lifecycle","measures":[{"measure":"dwell_seconds","function":"avg"},{"measure":"dwell_seconds","function":"percentile","percentile":0.95}],"group_by":["phase_id"]}'Response
200 OK{"query_id":"8e9d...","dataset":"workflow_lifecycle","columns":[{"name":"phase_id","label":"Phase","data_type":"string"},{"name":"avg_dwell_seconds","label":"Avg Dwell Seconds","data_type":"number"}],"rows":[{"phase_id":"uuid","avg_dwell_seconds":1842.5}],"total_rows":1,"truncated":false,"warnings":["3 open phase visits excluded from duration aggregates"],"summary":{"row_count":1,"sample_count":45,"closed_observation_count":42,"open_observation_count":3,"truncated":false,"warnings":[]},"provenance":{"metric_id":"workflow.phase.dwell","dataset":"workflow_lifecycle","grain":"interval","event_time_field":"event_time","projection_revision":"workflow_lifecycle_events.v1","includes_open_intervals":true}}/api/v1/event-streams/companies/{company_id}/metrics/workspaceExecute Unsaved Metrics Dashboard
Execute every widget in an unsaved dashboard in one request. Dashboard time range, granularity, and filters are applied to widgets that inherit filters.
Bearer token required. Permission: event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
widgets* | MetricWidget[] | Dashboard widgets to execute (maximum 24) |
time_from | datetime | Inclusive dashboard start time applied to inheriting widgets |
time_to | datetime | Exclusive dashboard end time applied to inheriting widgets |
filters | QueryFilter[] | Dashboard filters merged onto inheriting widgets |
granularity | hour | day | week | month | Dashboard bucket size applied to inheriting widgets |
Response Fields
| Name | Type | Description |
|---|---|---|
dashboard_id* | string | Nil UUID for unsaved dashboards |
dashboard_version* | integer | Always 0 for unsaved dashboards |
widgets* | MetricWidgetResult[] | Per-widget query results |
warnings* | string[] | Combined query warnings |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metrics/workspace" \
-H "Authorization: Bearer {token}" -H "Content-Type: application/json" \
-d '{"widgets":[{"id":"kpi-routed","title":"Transitions","visualization":"stat","query":{"metric":"workflow.items.routed"}}]}'Response
200 OK{"dashboard_id":"00000000-0000-0000-0000-000000000000","dashboard_version":0,"widgets":[{"id":"kpi-routed","title":"Transitions","visualization":"stat","result":{"rows":[],"warnings":[]}}],"warnings":[]}/api/v1/event-streams/companies/{company_id}/dashboardsList Saved Metric Views
List paginated dashboards granted to the caller, including caller preferences.
Bearer token required. Permission: event-streams:metrics:dashboards:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
limit | integer | Page size (1–100)Default: 50 |
offset | integer | Pagination offsetDefault: 0 |
Response Fields
| Name | Type | Description |
|---|---|---|
items* | Dashboard[] | Visible saved views |
total* | integer | Total visible views |
can_create* | boolean | Whether CREATE is granted on the organization resource |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards" -H "Authorization: Bearer {token}"Response
200 OK{"items":[],"total":0,"can_create":false}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/executeExecute Saved Metric View
Execute all widgets in a granted saved view using the caller's current metrics permission. An optional body can override widgets, time range, filters, and granularity without saving the view.
Bearer token required. Permissions: event-streams:metrics:dashboards:view and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
dashboard_id* | string | Saved view ID |
Request Body
| Name | Type | Description |
|---|---|---|
widgets | MetricWidget[] | Optional widget overrides; omitted widgets use the saved view |
time_from | datetime | Optional dashboard start time override |
time_to | datetime | Optional dashboard end time override |
filters | QueryFilter[] | Optional dashboard filter override, including an empty list |
granularity | hour | day | week | month | Optional dashboard granularity override |
Response Fields
| Name | Type | Description |
|---|---|---|
dashboard_version* | integer | Configuration version executed |
widgets* | MetricWidgetResult[] | Widget query results |
warnings* | string[] | Combined query warnings |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/execute" -H "Authorization: Bearer {token}"Response
200 OK{"dashboard_id":"view-uuid","dashboard_version":2,"widgets":[],"warnings":[]}/api/v1/event-streams/companies/{company_id}/metric-jobsCreate Metrics Export Job
Queue a bounded CSV or JSON export and return a durable job handle.
Bearer token required. Permissions: event-streams:metrics:export and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
query* | TypedQueryRequest | Bounded typed query |
output_format* | csv | json | Artifact format |
idempotency_key | string | Retry-safe creation key |
Response Fields
| Name | Type | Description |
|---|---|---|
id* | string | Job handle |
status* | string | queued, running, succeeded, failed, cancelled, or expired |
manifest | object | null | Bounded output metadata; never file contents |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metric-jobs" -H "Authorization: Bearer {token}"Response
202 Accepted{"id":"job-uuid","status":"queued","progress":0,"manifest":null}/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}Get Metrics Export Status
Poll a tenant-scoped export job. Every lookup rechecks current analytics permission.
Bearer token required. Permissions: event-streams:metrics:export and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
job_id* | string | Job handle |
Response Fields
| Name | Type | Description |
|---|---|---|
job* | MetricJob | Current durable job state |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}" -H "Authorization: Bearer {token}"Response
200 OK{"id":"job-uuid","status":"succeeded","progress":100,"row_count":42,"byte_count":2048,"expires_at":"2026-08-14T12:00:00Z"}/api/v1/event-streams/companies/{company_id}/dashboardsCreate Saved Metric View
Create a versioned metric workspace configuration. IAM grants, not visibility metadata, control access.
Bearer token required. Permission: event-streams:metrics:dashboards:create
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
config* | DashboardConfig | Widget configuration |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards" -H "Authorization: Bearer {token}"Response
201 Created{"id":"view-uuid","name":"Throughput","visibility":"private","version":1}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}Get Saved Metric View
Retrieve a granted saved dashboard and its caller preferences.
Bearer token required. Permission: event-streams:metrics:dashboards:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
dashboard_id* | string | Saved view ID |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}" -H "Authorization: Bearer {token}"Response
200 OK{"id":"view-uuid","name":"Throughput","visibility":"shared","version":2,"is_favorite":true}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}Update Saved Metric View
Update metadata or query configuration on a granted dashboard and increment its version.
Bearer token required. Permission: event-streams:metrics:dashboards:edit
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
dashboard_id* | string | Saved view ID |
Request Body
| Name | Type | Description |
|---|---|---|
config | DashboardConfig | Replacement configuration |
curl -X PATCH "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}" -H "Authorization: Bearer {token}"Response
200 OK{"id":"view-uuid","version":3,"can_edit":true}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}Delete Saved Metric View
Delete a granted dashboard and cascade its per-user preferences.
Bearer token required. Permission: event-streams:metrics:dashboards:delete
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
dashboard_id* | string | Saved view ID |
curl -X DELETE "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}" -H "Authorization: Bearer {token}"Response
204 No Content/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/preferencesUpdate Metric View Preferences
Update the caller's favorite flag and personal ordering position.
Bearer token required. Permission: event-streams:metrics:dashboards:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
dashboard_id* | string | Saved view ID |
Request Body
| Name | Type | Description |
|---|---|---|
is_favorite | boolean | Favorite flag |
curl -X PATCH "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/preferences" -H "Authorization: Bearer {token}"Response
200 OK{"id":"view-uuid","is_favorite":true,"user_position":0}/api/v1/event-streams/companies/{company_id}/dashboards/reorderReorder Metric Views
Persist the caller's personal order for granted saved views.
Bearer token required. Permission: event-streams:metrics:dashboards:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Request Body
| Name | Type | Description |
|---|---|---|
dashboard_ids* | string[] | Visible view IDs in order |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/reorder" -H "Authorization: Bearer {token}"Response
200 OK{"items":[],"total":0,"can_create":false}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/eligibleList Metric View Eligible Principals
List principals with Event Streams metrics access who can be connected and granted access to one concrete dashboard.
Bearer token required. Permission: event-streams:permissions:manage on the dashboard
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/eligible" -H "Authorization: Bearer {token}"Response
200 OK[]/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/resource-typesList Metric View Grantable Permissions
Return the non-federated dashboard resource type and permissions grantable from its Security surface.
Bearer token required. Permission: event-streams:permissions:manage on the dashboard
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/resource-types" -H "Authorization: Bearer {token}"Response
200 OK{"resource_types":[],"permissions":[]}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grantsList Metric View Grants
List grants created on one concrete dashboard, excluding inherited org grants.
Bearer token required. Permission: event-streams:permissions:manage on the dashboard
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants" -H "Authorization: Bearer {token}"Response
200 OK{"items":[],"total":0,"page":1,"limit":100}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grantsGrant Metric View Access
Grant a dashboard permission on one concrete dashboard.
Bearer token required. Permission: event-streams:permissions:manage on the dashboard
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants" -H "Authorization: Bearer {token}" -H "Content-Type: application/json" -d '{"principal_type":"member","principal_id":"{principal_id}","permission_id":"{permission_id}"}'Response
201 Created{"id":"{grant_id}","name":"event-streams:metrics:dashboards:view","resource":"org/{company_id}/dashboard/{dashboard_id}","effect":"allow"}/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants/{grant_id}Revoke Metric View Access
Revoke a grant from one concrete dashboard.
Bearer token required. Permission: event-streams:permissions:manage on the dashboard
curl -X DELETE "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants/{grant_id}" -H "Authorization: Bearer {token}"Response
204 No Content/api/v1/event-streams/companies/{company_id}/metric-jobsList Metrics Export Jobs
List tenant-scoped export jobs after current analytics permission checks.
Bearer token required. Permissions: event-streams:metrics:export and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metric-jobs" -H "Authorization: Bearer {token}"Response
200 OK{"items":[],"total":0}/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/cancelCancel Metrics Export Job
Cancel a queued or running metrics export.
Bearer token required. Permissions: event-streams:metrics:export and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
job_id* | string | Job handle |
curl -X POST "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/cancel" -H "Authorization: Bearer {token}"Response
200 OK{"id":"job-uuid","status":"cancelled","progress":42}/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/downloadDownload Metrics Export
Stream a completed Buckets artifact after tenant, export, and metrics permission checks.
Bearer token required. Permissions: event-streams:metrics:export and event-streams:metrics:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
job_id* | string | Job handle |
curl -L "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/download" -H "Authorization: Bearer {token}"Response
200 OKdownloaded artifact bytesTraces
Explore correlated event traces that span multiple services.
/api/v1/event-streams/companies/{company_id}/tracesList Traces
Paginated list of correlated event traces with optional filters.
Bearer token required. Permission: event-streams:traces:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
Query Parameters
| Name | Type | Description |
|---|---|---|
source | string | Filter traces that include this source |
min_events | integer | Minimum events in a trace (≥ 1)Default: 2 |
from | string (ISO 8601) | Time range start |
to | string (ISO 8601) | Time range end |
limit | integer | 1–200Default: 50 |
offset | integer | Pagination offset (≥ 0)Default: 0 |
Response Fields
| Name | Type | Description |
|---|---|---|
items* | TraceListItem[] | Trace summaries |
total* | integer | Total matching traces |
limit* | integer | Page size used |
offset* | integer | Offset used |
curl "https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/traces?source=workflows&limit=10" \
-H "Authorization: Bearer {token}"Response
200 OK{
"items": [
{
"correlation_id": "corr_01aaa-bbb-ccc-ddd-eee",
"event_count": 4,
"sources": ["iam", "workflows", "channels"],
"first_event_type": "iam.user.created",
"started_at": "2026-04-14T10:30:00Z",
"duration_ms": 4520
},
{
"correlation_id": "corr_02fff-ggg-hhh-iii-jjj",
"event_count": 3,
"sources": ["workflows", "agents"],
"first_event_type": "workflows.item.created",
"started_at": "2026-04-14T09:15:00Z",
"duration_ms": 1200
}
],
"total": 234,
"limit": 10,
"offset": 0
}/api/v1/event-streams/companies/{company_id}/traces/{correlation_id}Get Trace
Full event chain for a single correlation ID including all events in chronological order.
Bearer token required. Permission: event-streams:traces:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
correlation_id* | string | Correlation chain ID |
Response Fields
| Name | Type | Description |
|---|---|---|
correlation_id* | string | Correlation chain ID |
events* | TraceEvent[] | Chronologically ordered events |
sources* | string[] | All services involved |
started_at* | string (ISO 8601) | First event time |
ended_at* | string (ISO 8601) | Last event time |
duration_ms | integer | null | Total trace duration in milliseconds, or null |
curl https://platform.ergondata.ai/api/v1/event-streams/companies/{company_id}/traces/{correlation_id} \
-H "Authorization: Bearer {token}"Response
200 OK{
"correlation_id": "corr_01aaa-bbb-ccc-ddd-eee",
"events": [
{
"id": "ev_01abc123-4567-4890-abcd-ef0123456789",
"event_type": "iam.user.created",
"source": "iam",
"actor_id": "u9000000-0000-4000-8000-000000000001",
"actor_type": "member",
"payload": { "resource_type": "user", "resource_id": "u1234567-89ab-4cde-f012-3456789abcde" },
"timestamp": "2026-04-14T10:30:00Z"
},
{
"id": "ev_02def456-7890-4abc-def0-123456789abc",
"event_type": "workflows.item.created",
"source": "workflows",
"actor_id": "u9000000-0000-4000-8000-000000000001",
"actor_type": "member",
"payload": { "resource_type": "item", "resource_id": "wi_99887766", "workflow_id": "wf_01" },
"timestamp": "2026-04-14T10:30:02Z"
},
{
"id": "ev_03ghi789-0123-4def-0123-456789abcdef",
"event_type": "channels.message.sent",
"source": "channels",
"actor_id": null,
"actor_type": "system",
"payload": { "resource_type": "message", "resource_id": "msg_77665544" },
"timestamp": "2026-04-14T10:30:04.520Z"
}
],
"sources": ["iam", "workflows", "channels"],
"started_at": "2026-04-14T10:30:00Z",
"ended_at": "2026-04-14T10:30:04.520Z",
"duration_ms": 4520
}Real-Time Stream
WebSocket endpoint for streaming events in real time. This bidirectional streaming transport is intentionally not an agent ToolDef, which is limited to request/response HTTP operations.
/api/v1/event-streams/ws/companies/{company_id}/liveLive Event Stream (WebSocket)
Upgrade to a WebSocket connection that pushes new events for the company in real time. Each message is a JSON object matching the EventItem schema, with the same metadata-only payload projection applied at ingest.
JWT token via Sec-WebSocket-Protocol header (access_token.<jwt>), query parameter (token), or first WebSocket frame. Permission: event-streams:events:view
Path Parameters
| Name | Type | Description |
|---|---|---|
company_id* | string | Company ID |
curl -i -N \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
-H "Sec-WebSocket-Protocol: access_token.{token}" \
https://platform.ergondata.ai/api/v1/event-streams/ws/companies/{company_id}/liveResponse
101{
"id": "ev_04jkl012-3456-4789-abcd-ef0123456789",
"event_type": "workflows.item.updated",
"source": "workflows",
"company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
"actor_id": "u9000000-0000-4000-8000-000000000002",
"actor_type": "member",
"correlation_id": "corr_03kkk-lll-mmm-nnn-ooo",
"payload": {
"resource_type": "item",
"resource_id": "wi_99887766",
"changed_fields": ["status"]
},
"timestamp": "2026-04-14T11:05:33Z"
}