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.

Base URL/api/v1/event-streams

Events

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.

GET/api/v1/event-streams/companies/{company_id}/events

List 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

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
source
stringFilter by service source: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute
event_type
stringExact event type slug
event_type_prefix
stringEvent type prefix match
actor_id
stringFilter by actor UUID
actor_type
stringFilter by actor type
correlation_id
stringFilter by correlation chain
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end
search
stringCase-insensitive event type substring match
limit
integerResults per page (1–200)Default: 50
offset
integerPagination offset (≥ 0)Default: 0
sort
stringSort order: timestamp_desc or timestamp_ascDefault: timestamp_desc

Response Fields

NameTypeDescription
items*
EventItem[]Matching events
total*
integerTotal matching events
limit*
integerPage size used
offset*
integerOffset 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
}
GET/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

NameTypeDescription
company_id*
stringCompany ID
event_id*
stringEvent ID

Response Fields

NameTypeDescription
id*
stringEvent ID
event_type*
stringEvent type slug
source*
stringOriginating service
company_id*
stringCompany ID
actor_id*
string | nullActor who triggered the event, or null
actor_type*
string | nullActor type, or null
correlation_id*
string | nullCorrelation chain ID, or null
payload*
objectMetadata-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"
}
GET/api/v1/event-streams/event-types

List Event Type Catalog

Catalog of all known event types across services.

Bearer token required. Permission: event-streams:events:view

Query Parameters

NameTypeDescription
source
stringFilter by service source

Response Fields

NameTypeDescription
[]*
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.

GET/api/v1/event-streams/companies/{company_id}/metrics/catalog

Get 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

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
source
stringFilter by service source

Response Fields

NameTypeDescription
[]*
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"
  }
]
POST/api/v1/event-streams/companies/{company_id}/metrics/query

Query 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

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
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
stringhour, day, or weekDefault: day
source
stringFilter by service source
event_type
stringFilter by event type

Response Fields

NameTypeDescription
results*
MetricResult[]One result per requested metric
time_range*
objectEffective 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"
  }
}
GET/api/v1/event-streams/companies/{company_id}/metrics/summary

Get Summary

High-level event counts and breakdown by source for the given time range.

Bearer token required. Permission: event-streams:metrics:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end
source
stringFilter by service source: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute

Response Fields

NameTypeDescription
total_events*
integerTotal event count
events_by_source*
objectMap of source to event count
active_actors*
integerDistinct actors in the range
time_range*
objectEffective 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"
  }
}
GET/api/v1/event-streams/companies/{company_id}/metrics/timeseries

Get Timeseries

Zero-filled time series of event counts bucketed by granularity.

Bearer token required. Permission: event-streams:metrics:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
granularity
stringhour, day, or weekDefault: day
source
stringFilter by service source
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end

Response Fields

NameTypeDescription
buckets*
TimeseriesBucket[]Zero-filled time series
granularity*
stringGranularity 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"
}
GET/api/v1/event-streams/companies/{company_id}/metrics/top-event-types

Top Event Types

Most frequently occurring event types ranked by count.

Bearer token required. Permission: event-streams:metrics:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
source
stringFilter by service source
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end
limit
integer1–50Default: 10

Response Fields

NameTypeDescription
items*
TopItem[]Ranked event types
total*
integerTotal 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
}
GET/api/v1/event-streams/companies/{company_id}/metrics/top-actors

Top Actors

Most active actors ranked by event count.

Bearer token required. Permission: event-streams:metrics:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end
limit
integer1–50Default: 10

Response Fields

NameTypeDescription
items*
TopItem[]Ranked actors
total*
integerTotal 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
}
GET/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

NameTypeDescription
company_id*
stringCompany ID
source*
stringService name: iam, workflows, channels, agents, worksheets, buckets, conversations, automations, apps, vault, compute

Query Parameters

NameTypeDescription
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end

Response Fields

NameTypeDescription
source*
stringService name
total_events*
integerTotal 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.

GET/api/v1/event-streams/companies/{company_id}/metrics/dimensions

List 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

NameTypeDescription
company_id*
stringCompany ID

Response Fields

NameTypeDescription
datasets*
AnalyticsDataset[]Allowlisted datasets and fields
operators*
objectAllowlisted 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"}}
GET/api/v1/event-streams/companies/{company_id}/metrics/labels

Resolve 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

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
ids*
stringComma-separated workflow or phase UUIDs, at most 200

Response Fields

NameTypeDescription
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"}]}
POST/api/v1/event-streams/companies/{company_id}/metrics/execute

Execute 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

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
metric
stringSemantic metric ID such as workflow.phase.dwell or workflow.items.routed
dataset
event_facts | workflow_lifecycleLegacy 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

NameTypeDescription
query_id*
stringDeterministic identifier for the normalized query
columns*
MetricQueryColumn[]Typed result-column metadata
rows*
object[]Compact result rows
summary*
MetricQuerySummaryRow, truncation, and warning summary
warnings*
string[]Open/late/invalid, truncation, or diagnostic warnings
provenance*
QueryProvenanceNormalized 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}}
POST/api/v1/event-streams/companies/{company_id}/metrics/workspace

Execute 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

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
widgets*
MetricWidget[]Dashboard widgets to execute (maximum 24)
time_from
datetimeInclusive dashboard start time applied to inheriting widgets
time_to
datetimeExclusive dashboard end time applied to inheriting widgets
filters
QueryFilter[]Dashboard filters merged onto inheriting widgets
granularity
hour | day | week | monthDashboard bucket size applied to inheriting widgets

Response Fields

NameTypeDescription
dashboard_id*
stringNil UUID for unsaved dashboards
dashboard_version*
integerAlways 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":[]}
GET/api/v1/event-streams/companies/{company_id}/dashboards

List Saved Metric Views

List paginated dashboards granted to the caller, including caller preferences.

Bearer token required. Permission: event-streams:metrics:dashboards:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
limit
integerPage size (1–100)Default: 50
offset
integerPagination offsetDefault: 0

Response Fields

NameTypeDescription
items*
Dashboard[]Visible saved views
total*
integerTotal visible views
can_create*
booleanWhether 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}
POST/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/execute

Execute 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

NameTypeDescription
company_id*
stringCompany ID
dashboard_id*
stringSaved view ID

Request Body

NameTypeDescription
widgets
MetricWidget[]Optional widget overrides; omitted widgets use the saved view
time_from
datetimeOptional dashboard start time override
time_to
datetimeOptional dashboard end time override
filters
QueryFilter[]Optional dashboard filter override, including an empty list
granularity
hour | day | week | monthOptional dashboard granularity override

Response Fields

NameTypeDescription
dashboard_version*
integerConfiguration 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":[]}
POST/api/v1/event-streams/companies/{company_id}/metric-jobs

Create 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

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
query*
TypedQueryRequestBounded typed query
output_format*
csv | jsonArtifact format
idempotency_key
stringRetry-safe creation key

Response Fields

NameTypeDescription
id*
stringJob handle
status*
stringqueued, running, succeeded, failed, cancelled, or expired
manifest
object | nullBounded 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}
GET/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

NameTypeDescription
company_id*
stringCompany ID
job_id*
stringJob handle

Response Fields

NameTypeDescription
job*
MetricJobCurrent 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"}
POST/api/v1/event-streams/companies/{company_id}/dashboards

Create 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

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
config*
DashboardConfigWidget 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}
GET/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

NameTypeDescription
company_id*
stringCompany ID
dashboard_id*
stringSaved 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}
PATCH/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

NameTypeDescription
company_id*
stringCompany ID
dashboard_id*
stringSaved view ID

Request Body

NameTypeDescription
config
DashboardConfigReplacement 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}
DELETE/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

NameTypeDescription
company_id*
stringCompany ID
dashboard_id*
stringSaved 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
PATCH/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/preferences

Update Metric View Preferences

Update the caller's favorite flag and personal ordering position.

Bearer token required. Permission: event-streams:metrics:dashboards:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID
dashboard_id*
stringSaved view ID

Request Body

NameTypeDescription
is_favorite
booleanFavorite 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}
POST/api/v1/event-streams/companies/{company_id}/dashboards/reorder

Reorder Metric Views

Persist the caller's personal order for granted saved views.

Bearer token required. Permission: event-streams:metrics:dashboards:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Request Body

NameTypeDescription
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}
GET/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/eligible

List 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
[]
GET/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/resource-types

List 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":[]}
GET/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants

List 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}
POST/api/v1/event-streams/companies/{company_id}/dashboards/{dashboard_id}/access/grants

Grant 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"}
DELETE/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
GET/api/v1/event-streams/companies/{company_id}/metric-jobs

List 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

NameTypeDescription
company_id*
stringCompany 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}
POST/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/cancel

Cancel 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

NameTypeDescription
company_id*
stringCompany ID
job_id*
stringJob 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}
GET/api/v1/event-streams/companies/{company_id}/metric-jobs/{job_id}/download

Download 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

NameTypeDescription
company_id*
stringCompany ID
job_id*
stringJob 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 OK
downloaded artifact bytes

Traces

Explore correlated event traces that span multiple services.

GET/api/v1/event-streams/companies/{company_id}/traces

List Traces

Paginated list of correlated event traces with optional filters.

Bearer token required. Permission: event-streams:traces:view

Path Parameters

NameTypeDescription
company_id*
stringCompany ID

Query Parameters

NameTypeDescription
source
stringFilter traces that include this source
min_events
integerMinimum events in a trace (≥ 1)Default: 2
from
string (ISO 8601)Time range start
to
string (ISO 8601)Time range end
limit
integer1–200Default: 50
offset
integerPagination offset (≥ 0)Default: 0

Response Fields

NameTypeDescription
items*
TraceListItem[]Trace summaries
total*
integerTotal matching traces
limit*
integerPage size used
offset*
integerOffset 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
}
GET/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

NameTypeDescription
company_id*
stringCompany ID
correlation_id*
stringCorrelation chain ID

Response Fields

NameTypeDescription
correlation_id*
stringCorrelation 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 | nullTotal 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.

WS/api/v1/event-streams/ws/companies/{company_id}/live

Live 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

NameTypeDescription
company_id*
stringCompany 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}/live

Response

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"
}