fetch("https://yourdomain.edge.zerokey.com/v3/modules/historian/positionUpdates", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_ACCESS_TOKEN>"
},
body: JSON.stringify([{
"StartTime": "2025-07-01T08:00:00Z",
"EndTime": "2025-07-01T18:00:00Z",
"DeviceID": "00:AA:BB:CC:DD:EE"
}])
})
.then(res => res.json())
.then(data => console.log("TaskID:", data.TaskID));
fetch("https://yourdomain.edge.zerokey.com/v3/modules/historian/zoneCollisions", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_ACCESS_TOKEN>"
},
body: JSON.stringify({
"ZoneIDs": ["7237c212-aec8-4e86-8087-e4726eaaf0a1"],
"Devices": [{}],
"IncludePositionalData": false
})
})
.then(res => res.json())
.then(data => console.log("TaskID:", data.TaskID));
curl -X GET \
'https://yourdomain.edge.zerokey.com/v3/modules/historian/file/{TaskID}' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>'