This endpoint returns a list of all uploaded media (video and still images) matching query parameters, with a maximum query range of one day. Additional media can be retrieved with the Create a media retrieval request endpoint, and they will be included in the list after they are uploaded. Urls provided by this endpoint expire in 8 hours.
Rate limit: 5 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Media Retrieval under the Safety & Cameras category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request GET \
--url https://api.samsara.com/cameras/media \
--header 'Authorization: Bearer <token>'{
"data": {
"media": [
{
"availableAtTime": "2019-11-11T14:00:12-04:00",
"endTime": "2019-06-13T19:08:25Z",
"input": "dashcamForwardFacing",
"mediaType": "image",
"startTime": "2019-06-13T19:08:25Z",
"triggerReason": "api",
"vehicleId": "1234",
"cameraRole": "leftMirrorMount",
"urlInfo": {
"url": "https://sample.s3.url.com/image.jpeg",
"urlExpiryTime": "2019-11-11T14:00:12-04:00"
}
}
]
},
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A filter on the data based on this comma-separated list of vehicle IDs and externalIds. You can specify up to 20 vehicles. Example: vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186
An optional list of desired camera inputs for which to return captured media. If empty, media for all available inputs will be returned.
dashcamRoadFacing, dashcamDriverFacing, analog1, analog2, analog3, analog4 An optional list of desired media types for which to return captured media. If empty, media for all available media types will be returned. Possible options include: image, videoHighRes.
image, videoHighRes An optional list of desired trigger reasons for which to return captured media. If empty, media for all available trigger reasons will be returned. Possible options include: api, panicButton, periodicStill, rfidEvent, safetyEvent, tripEndStill, tripStartStill, videoRetrieval. videoRetrieval represents media captured for a dashboard video retrieval request.
api, panicButton, periodicStill, rfidEvent, safetyEvent, tripEndStill, tripStartStill, videoRetrieval A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
An end time in RFC 3339 format. End time cannot be more than 24 hours after startTime. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
An optional timestamp in RFC 3339 format that can act as a cursor to track which media has previously been retrieved; only media whose availableAtTime comes after this parameter will be returned. Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
curl --request GET \
--url https://api.samsara.com/cameras/media \
--header 'Authorization: Bearer <token>'{
"data": {
"media": [
{
"availableAtTime": "2019-11-11T14:00:12-04:00",
"endTime": "2019-06-13T19:08:25Z",
"input": "dashcamForwardFacing",
"mediaType": "image",
"startTime": "2019-06-13T19:08:25Z",
"triggerReason": "api",
"vehicleId": "1234",
"cameraRole": "leftMirrorMount",
"urlInfo": {
"url": "https://sample.s3.url.com/image.jpeg",
"urlExpiryTime": "2019-11-11T14:00:12-04:00"
}
}
]
},
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}