---
title: "[beta] Returns a list of all detections in an organization."
method: GET
path: "/detections/stream"
tags: ["Beta APIs"]
---

# \[beta\] Returns a list of all detections in an organization.

`GET /detections/stream`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/detections/stream`
- Auth: HTTP bearer

This endpoint will return all detections detected by in-vehicle assets and associated metadata. To get core endpoint data, select View Safety Detection Log under the Safety & Cameras category when creating or editing an API token.

If you include an endTime, the endpoint will return data up until that point. If you don’t include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. Results are paginated.

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Read Detection Log** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Query parameters

- `driverIds` string[]
- `assetIds` string[]
- `detectionBehaviorLabels` string[]
- `inboxFilterReason` string[]
- `inboxEvent` boolean
- `inCabAlertPlayed` boolean
- `tagIds` string[]
- `includeAsset` boolean
- `includeDriver` boolean
- `startTime` string, required
- `endTime` string
- `after` string

## Response `200`

OK response.

- DetectionLogGetDetectionsResponseBody
  - `data` DetectionLogDetectionObjectResponseBody[], required: Array of detection log entries
    - `asset` DetectionLogAssetObjectResponseBody, required: Asset that the detection is tied to. Always returned.
      - `attributes` GoaAttributeTinyResponseBody[]: List of attributes associated with the entity
        - `dateValues` string[]: List of date values associated with the attribute (RFC 3339 full-date format: YYYY-MM-DD).
        - `id` string: Id of the attribute
        - `name` string: Name of the attribute
        - `numberValues` number[]: List of number values associated with the attribute
        - `stringValues` string[]: List of string values associated with the attribute.
      - `id` string, required: Unique ID for the asset object that is reporting the detection. Always returned.
      - `name` string: Name for the asset object that is reporting the safety event. Only returned when includeAsset is set to true
      - `tags` GoaTagTinyResponseResponseBody[]: Tags for the asset associated with the safety event. Only returned when includeAsset is set to true
        - `id` string, required: ID of the tag
        - `name` string, required: Name of the tag.
        - `parentTagId` string: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted.
    - `createdAtTime` string, required: Time the detection was detected or in-cab alert played in UTC. RFC 3339 format. Always returned.
    - `driver` DetectionLogDriverObjectResponseBody: Driver that is assigned to the safety event. Always returned. Null if driver is not assigned.
      - `attributes` GoaAttributeTinyResponseBody[]: List of attributes associated with the entity
        - `dateValues` string[]: List of date values associated with the attribute (RFC 3339 full-date format: YYYY-MM-DD).
        - `id` string: Id of the attribute
        - `name` string: Name of the attribute
        - `numberValues` number[]: List of number values associated with the attribute
        - `stringValues` string[]: List of string values associated with the attribute.
      - `externalIds` object: A map of external ids for the driver assigned to the safety event. Only returned when includeDriver is set to true
      - `id` string, required: Unique ID for the driver object that is assigned to the safety event. Always returned when a driver is assigned.
      - `name` string: Name of the driver assigned to the safety event. Only returned when includeDriver is set to true
      - `tags` GoaTagTinyResponseResponseBody[]: Tags for the driver assigned to the safety event. Only returned when includeDriver is set to true
        - `id` string, required: ID of the tag
        - `name` string, required: Name of the tag.
        - `parentTagId` string: If this tag is part a hierarchical tag tree, this is the ID of the parent tag, otherwise this will be omitted.
    - `id` string, required: Unique Samsara ID (uuid) of the detection.
    - `inCabAlertPlayed` boolean, required: Whether an in cab alert played aloud in the cab. Always returned.
    - `safetyEvent` DetectionLogSafetyEventObjectResponseBody[], required: Details on the associated safety event generated. Always returned.
      - `id` string: Unique Samsara ID (uuid) of the safety event. Only returned when safetyEvent.inboxEvent is true.
      - `inboxEvent` boolean, required: Whether a corresponding safety event was published to the Safety Inbox. Always returned.
      - `inboxFilterReason` 'overDailyLimit' | 'overHourlyLimit' | 'overTripLimit' | 'belowConfidenceThreshold' | 'belowSeverityThreshold' | 'overEventRateLimit' | 'geofenceFilter' | 'belowNudgeThreshold' | 'belowSpeedThreshold' | 'nighttimeFilter' | 'speedingFilter' | 'inCabAlertOnly' | 'unknown': The reason the detection was filtered out of the inbox. Only returned when safetyEvent.inboxEvent is false Valid values: `overDailyLimit`, `overHourlyLimit`, `overTripLimit`, `belowConfidenceThreshold`, `belowSeverityThreshold`, `overEventRateLimit`, `geofenceFilter`, `belowNudgeThreshold`, `belowSpeedThreshold`, `nighttimeFilter`, `speedingFilter`, `inCabAlertOnly`, `unknown`
    - `triggerDetectionLabel` 'acceleration' | 'braking' | 'crash' | 'drowsy' | 'eatingDrinking' | 'edgeRailroadCrossingViolation' | 'followingDistance' | 'forwardCollisionWarning' | 'genericDistraction' | 'harshImpact' | 'harshTurn' | 'heavySpeeding' | 'laneDeparture' | 'lightSpeeding' | 'maxSpeed' | 'mobileUsage' | 'moderateSpeeding' | 'noSeatbelt' | 'obstructedCamera' | 'passenger' | 'policyViolationMask' | 'proximityWarning' | 'ranRedLight' | 'rearCollisionWarning' | 'reversing' | 'rollingStop' | 'rolloverProtection' | 'severeSpeeding' | 'smoking' | 'speeding' | 'unsafeParking' | 'vehicleInBlindSpotWarning' | 'vulnerableRoadUserCollisionWarning' | 'yawControl', required: The label associated with the detection. Always returned. Valid values: `acceleration`, `braking`, `crash`, `drowsy`, `eatingDrinking`, `edgeRailroadCrossingViolation`, `followingDistance`, `forwardCollisionWarning`, `genericDistraction`, `harshImpact`, `harshTurn`, `heavySpeeding`, `laneDeparture`, `lightSpeeding`, `maxSpeed`, `mobileUsage`, `moderateSpeeding`, `noSeatbelt`, `obstructedCamera`, `passenger`, `policyViolationMask`, `proximityWarning`, `ranRedLight`, `rearCollisionWarning`, `reversing`, `rollingStop`, `rolloverProtection`, `severeSpeeding`, `smoking`, `speeding`, `unsafeParking`, `vehicleInBlindSpotWarning`, `vulnerableRoadUserCollisionWarning`, `yawControl`
    - `updatedAtTime` string, required: Time the detection was updated in Samsara in UTC. RFC 3339 format. Always returned.
  - `pagination` GoaPaginationResponseResponseBody, required: Pagination parameters.
    - `endCursor` string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
