Get single event metric
const url = 'https://safe-api.safetyradar.com/v2/events/123e4567-e89b-12d3-a456-426614174000/metrics/risk';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/123e4567-e89b-12d3-a456-426614174000/metrics/risk \ --header 'Authorization: Bearer <token>' \ --header 'x-team: my-team-slug'Get a specific metric for an event by its slug identifier.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Event ID (UUID) or external ID
Example
123e4567-e89b-12d3-a456-426614174000Event ID (UUID) or external ID
Metric slug identifier
Example
riskMetric slug identifier
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”Event metric
object
object
Examplegenerated
{ "data": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "flowRunId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "flowRunNodeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metricId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "transformedValue": "example", "value": "example", "reason": "example", "confidenceScore": 1, "reviewStatus": 1, "auditScore": 1, "auditReason": "example", "createdAt": "example", "updatedAt": "example", "teamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metricSlug": "example", "metricName": "example" }}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"}Event or metric not found
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"}
