Bulk export workflow metrics
const url = 'https://safe-api.safetyradar.com/v2/metrics?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/metrics?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 across all events for a team, filtered by update time. Useful for syncing metrics back to customer systems.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only metrics updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Page through with page until hasNext is false, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.
Example
2026-09-01T00:00:00ZOnly metrics updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Page through with page until hasNext is false, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.
Only 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 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 metrics export
object
object
object
object
object
Examplegenerated
{ "data": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "flowRunId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "transformedValue": "example", "value": "example", "reason": "example", "confidenceScore": 1, "reviewStatus": 1, "createdAt": "example", "updatedAt": "example", "teamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metricSlug": "example", "metricName": "example", "eventExternalId": "example" } ], "meta": { "teamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pagination": { "page": 1, "limit": 1, "total": 1, "totalPages": 1, "hasNext": true, "hasPrev": true }, "filters": { "updatedAfter": "2026-04-15T12:00:00Z", "updatedBefore": "2026-04-15T12:00:00Z" } }}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"}
