Skip to content

Bulk export event metrics grouped by event

GET
/events/metrics/bulk
curl --request GET \
--url 'https://safe-api.safetyradar.com/v2/events/metrics/bulk?updatedAfter=2026-09-01T00%3A00%3A00Z&updatedBefore=2026-09-30T00%3A00%3A00Z&page=1&limit=100' \
--header 'Authorization: Bearer <token>' \
--header 'x-team: my-team-slug'

Export workflow metrics grouped by event for the org, filtered by metric update time. Returns one row per event with embedded metrics[] from the latest completed live flow run. Parity replacement for /assessments bulk export.

updatedAfter

Only events with metrics updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Use the bounds as a time window; the order of this list does not make its last record a cursor.

string format: date-time
Example
2026-09-01T00:00:00Z

Only events with metrics updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Use the bounds as a time window; the order of this list does not make its last record a cursor.

updatedBefore

Only events with metrics updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.

string format: date-time
Example
2026-09-30T00:00:00Z

Only events with metrics updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.

page

Page number, starting at 1 (default: 1)

integer
default: 1
Example
1

Page number, starting at 1 (default: 1)

limit

Results per page (default: 100, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.

integer
default: 100 <= 1000
Example
100

Results per page (default: 100, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.

x-team

Deprecated — accepted but ignored; the v2 API is org-scoped.

string
Example
my-team-slug

Deprecated — accepted but ignored; the v2 API is org-scoped.

Bulk event metrics export

Media typeapplication/json
object
data
required
Array<object>
object
eventId
required
string format: uuid
eventExternalId
required
string
nullable
eventTitle
required
string
nullable
teamId
required
string format: uuid
nullable
flowRunId
required
string format: uuid
flowRunType
required
string
Allowed values: live draft
flowId
required
string format: uuid
flowName
required
string
nullable
flowVersion
required
number
flowRunStatus
required
string
Allowed values: pending running completed failed
metrics
required
Array<object>
object
id
required
string format: uuid
flowRunNodeId
required
string format: uuid
metricSlug
required
string
metricName
required
string
value
nullable
transformedValue
required
string
nullable
reason
required
string
confidenceScore
required
number
nullable
reviewStatus
required
number
auditScore
required
number
nullable
auditReason
required
string
nullable
createdAt
required
string
updatedAt
required
string
confidenceScore
required
number
nullable
updatedAt
required
string
meta
required
object
teamId
required
string format: uuid
nullable
pagination
required
object
page
required
number
limit
required
number
total
required
number
totalPages
required
number
hasNext
required
boolean
hasPrev
required
boolean
filters
required
object
updatedAfter
required
string format: date-time
nullable
updatedBefore
required
string format: date-time
nullable
Example
{
"data": [
{
"flowRunType": "live",
"flowRunStatus": "pending"
}
]
}

Invalid request: a parameter or the body failed validation (validation_error), or the body is not valid JSON (invalid_json)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unauthorized

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Rate limit exceeded (rate_limit_exceeded)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unexpected server error (internal_error)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Version bd999fd · Released November 23, 2026