The Historical Dwell Time API measures the total amount of time per the device for the “session of dwelling” within a department or zone.
Dwell times are calculated based on the entrance and exit of departments or zones, enabling the triggering of actions.
METHOD: |
GET |
URI: |
<production url>/v1/locations |
SAMPLE URI: |
<production url>/v1/locations/1000000106/analytics?analytic-names=DWLZONE&analytic-categories=DWELL_TIME&start-ts=1461171600000&end-ts=1461256935323 |
Query Parameters
Parameter |
Description |
Required? |
Values |
id |
GE identifier for a location |
Yes |
1000000106 |
analytic-names |
- For Dwell Time by Zone, the dwell zone.
- For Dwell Time by Device, the dwell device.
|
Yes |
- For Dwell Time by Zone, a String, such as DWLZONE.
- For Dwell Time by Device, a String, such as DWLDVCE.
|
analytic-categories |
For both Dwell Time by Zone and Dwell Time by Device, the dwell time. |
Yes. |
A String, such as DWELL_TIME. |
start-ts |
Start time in milliseconds. |
Yes |
Number, with a value such as 1459148400000. |
end-ts |
End time in milliseconds. |
Yes |
Number, with a value such as 1459212163672. |
Response Parameters
Parameter |
Data Type |
Required? |
Description |
analyticName |
String |
Yes |
Either DWLZONE or DWLDVCE |
properties |
String |
Yes |
Identifies the dwell time either by zone or by device:- For ZONE, the zone and time spent in that zone are given, expressed as a string. For example, "Zone-4": 214 specifies that 214 seconds were spent in zone 4
- For DEVICE, the following information is provided:
- DEVICE-ID: Unique identifier established by a customer or external resource for the asset monitoring the location. For example, "P_2".
- SESSION-ID: ID of the specific session, expressed as an alphanumeric string such as 30b9bad8-3da9-4bbb-9202-1f41fcdc5ee4.
- SESSION-START: Time the session started, expressed in seconds as a LONG number, such as 1461175225469.
- SESSION-END: Time the session ended, expressed in seconds as a LONG number, such as 1461175510880.
- DWELLTIME-BY-DEPARTMENT: Time spent in a particular zone. For example, "Zone-3": 107, specifies that 107 seconds were spent in zone 3.
|
Sample Response for Dwell Time by Zone
{
"analyticCategory": "DWELL_TIME",
"analyticName": "DWLZONE",
"properties": {
"": 721,
"Zone-4": 214,
"Zone-3": 407,
"Zone-2": 305,
"Zone-1": 400,
"Zone-5": 14,
"Entry-Exit": 68
}
}
Sample Response for Dwell Time by Device
{
"analyticCategory": "DWELL_TIME",
"analyticName": "DWLDVCE",
"properties": [
{
"device-id": "P_2",
"session-id": "30b9bad8-3da9-4bbb-9202-1f41fcdc5ee4",
"sesion-start": 1461175225469,
"session-end": 1461175235469,
"dwelltime-by-department": {
"Entry-Exit": 3
}
},
{
"device-id": "P_2",
"session-id": "b4c3d1b9-dde1-40a4-9018-6503d453d53c",
"sesion-start": 1461175395880,
"session-end": 1461175510880,
"dwelltime-by-department": {
"": 19,
"Entry-Exit": 2
}
},
{
"device-id": "P_2",
"session-id": "73862707-1556-47a7-96f8-494ece2b8831",
"sesion-start": 1461173320786,
"session-end": 1461174840786,
"dwelltime-by-department": {
"": 84,
"Zone-3": 107,
"Zone-2": 28,
"Zone-1": 65,
"Entry-Exit": 4
}
}
]
}