Bulk export event metrics grouped by event
const 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';const options = { method: 'GET', headers: {'x-team': 'my-team-slug', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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.
Example
2026-09-01T00:00:00ZOnly 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.
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.
Example
2026-09-30T00:00:00ZOnly 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 number, starting at 1 (default: 1)
Example
1Page number, starting at 1 (default: 1)
Results per page (default: 100, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.
Example
100Results per page (default: 100, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.
Header Parameters
Section titled “Header Parameters”Deprecated — accepted but ignored; the v2 API is org-scoped.
Example
my-team-slugDeprecated — accepted but ignored; the v2 API is org-scoped.
Responses
Section titled “Responses”Bulk event metrics export
object
object
object
object
object
object
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)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unauthorized
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Rate limit exceeded (rate_limit_exceeded)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unexpected server error (internal_error)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}
