Realtime API (en)
Query guests by real-time detected inside store or sensor.
Getting Started
By real-time API, you can query the number of guest in real-time by stores and sensors. The mean of guest number in real-time is that unique device IDs which have been collected during 10mins.
Prerequisites
Authentication
Before you start developing with the Realtime API, review the authentication requirements (you need an authentication_token).
Number of guest by realtime requests
By real-time API, you can get the wi-fi device number which is not overlapped. The real-time data set is proceeded and saved automatically just after collected by sensors. The interval is 2 seconds.
A Realtime request is an HTTP URL of the following form:
where area may be either of the following values:
Inindicates the number of guest who is inside (the device ID which is collected from 'in' area).outindicates the number of traffic of outside (the device ID which is collected from 'out' area).
Certain parameters are required to initiate a Realtime request. As is standard in URLs, all parameters are separated using the ampersand (&) character.
Required parameters
- There is no required parameters here.
Optional parameters
limit- The number of data set which to retrieve
Realtime request example
The following example is a request 10 data set consist of current number of outside traffic for shop ID 574 (time-reverse-ordered).
https://api.walkinsights.com/api/v1/shops/574/realtime/out?limit=10You can find the result of request from Realtime responses section.
Request responses
The following example shows a Realtime response.
{
"values": [
{
"expires_at": 1506502922000,
"key": "shop:574:in",
"time": 1506502322000,
"value": 27
},
{
"expires_at": 1506502920000,
"key": "shop:574:in",
"time": 1506502320000,
"value": 36
},
{
"expires_at": 1506502918000,
"key": "shop:574:in",
"time": 1506502318000,
"value": 39
},
{
"expires_at": 1506502916000,
"key": "shop:574:in",
"time": 1506502316000,
"value": 39
},
{
"expires_at": 1506502914000,
"key": "shop:574:in",
"time": 1506502314000,
"value": 39
},
{
"expires_at": 1506502912000,
"key": "shop:574:in",
"time": 1506502312000,
"value": 40
},
{
"expires_at": 1506502910000,
"key": "shop:574:in",
"time": 1506502310000,
"value": 40
},
{
"expires_at": 1506502908000,
"key": "shop:574:in",
"time": 1506502308000,
"value": 39
},
{
"expires_at": 1506502906000,
"key": "shop:574:in",
"time": 1506502306000,
"value": 39
},
{
"expires_at": 1506502904000,
"key": "shop:574:in",
"time": 1506502304000,
"value": 34
}
],
"next": 1506502302000
}A response contains up to two root elements:
values- contains the list of data set divided by 2 seconds. Each data set contains below elements:expires_at- indicates Unix Timestamp which the data set will be expired. Time unit is millisecond.key- indicates the name of bucket which data set contained. This is for internal usage.time- indicates Unix Timestamp which the data set has been created. Time unit is millisecond.value- indicates the number of Wi-Fi devices which is distinct.next- indicates the time value of data set which would be created after the last data set.
Updated 8 months ago
