Back to All

camera parameter issue

(edited)

Hi I'm currently trying to use

https://api.samsara.com/fleet/vehicles/cameras/media/history

but having issues with startTime and endTime parameters

I set it as close as I can but it says missing from query string.

python 3.x
camera = 'https://api.samsara.com/fleet/vehicles/cameras/media/history'
headers = {
"Accept": "application/json",
"Authorization": "Bearer TOKEN",
"startTime": "2021-02-14T00:00:00Z",
"endTime": "2021-02-15T00:00:00Z"
}
response = requests.request("GET", camera, headers=headers)

print(response.text)

result:
<class 'str'>
2021-02-16T17:05:09Z 2021-02-16T17:05:09Z
{"message":""startTime" is missing from query string; "endTime" is missing from query string","requestId":"74dcdd32-6e4ae656"}