Analytics

Periodically (e.g. every second), our system collects and stores the position of every user. This data can be retrieved by the following request.
The data object
device_id integer
Device identifier
floor_id integer
Floor identifier in which the user is positioned
position array
Cartesian coordinates taking the bottomleft corner as the origin
More details here
Coordinates [ x, y ] in meters
yaw integer
User rotation angle relative to earth in radians
More details here
time_sec datetime
Last time when the user was positioned
Example Response
{
  "analytics": [
    {
      "device_id": 255716529991690,
      "floor_id": 50,
      "position": [8.77718353, 17.8887081],
      "yaw": 267,
      "time_sec": "2015-04-15T21:03:06.000Z"
    }
  ]
}

Historic positioning data of a building

Periodically (e.g. every second), our system collects and stores the position of every user. This method provides all the positioning data of a building at a certain date. Each positioning record contains the identifier of the user who generated it, the timestamp when the record was originated, and the position of the user at that time: x, y, yaw and floor.
Parameters
X-API-EMAIL required
The email of the user
X-API-KEY required
The API key of the user
date required query param
Date (YYYY-MM-DDTHH:mm:ss.SSSZ). The retrieved positioning data will come with the time zone sent on the param. If the param has not time zone the positioning data will retrieve in GMT+2.
E.g. 2017-05-25T21:55:00.000-03:00
building_id required query param
Building identifier (retrieve all your buildings to know their identifiers)
date_end optional query param
Date (YYYY-MM-DDTHH:mm:ss.SSSZ). If you want to retrieve positioning data from a building of several days. The retrieved positioning data will come with the time zone sent on the param.
E.g. 2017-05-25T21:55:00.000-03:00
device_id optional query param
If you want to retrieve positioning data of a certain user
Returns
Returns an array of data objects.
Error Status Codes
Request url
https://dashboard.situm.es/api/v1/real_time/analytics/raw_pose_data?date=date&building_id=building_id
Curl
curl -H 'Content-Type: application/json' -H 'X-API-EMAIL: user@example.com' -H 'X-API-KEY: T9NP2lzk+jSI/Oi5DG6ODk57O0pZXdx4' "https://dashboard.situm.es/api/v1/analytics/raw_pose_data?date=2015-04-04&building_id=101"
Response body
{
  "analytics": [
    {
      "device_id": 255716529991690,
      "floor_id": 50,
      "position": [8.77718353, 17.8887081],
      "yaw": 267,
      "time_sec": "2015-04-15T21:03:06.000Z"
    },
    {
      "device_id": 255716529991691,
      "floor_id": 50,
      "position": [8.77718354, 17.88877648],
      "yaw": 267,
      "time_sec": "2015-04-15T21:03:06.000Z"
    },
    {
      "device_id": 255716529991692,
      "floor_id": 50,
      "position": [8.77718987, 17.8887154],
      "yaw": 267,
      "time_sec": "2015-04-15T21:03:06.000Z"
    }
  ]
}

Export positioning data of a building as a CSV file

Periodically (e.g. every second), our system collects and stores the position of every user. This method downloads a CSV file with all the positioning data of a building at a certain date. Each positioning record contains the identifier of the user who generated it, the timestamp when the record was originated,if the user is indoor and the position of the user at that time: x, y, lat, lng, yaw and floor.
Parameters
X-API-EMAIL required
The email of the user
X-API-KEY required
The API key of the user
building_id required path param
Building identifier (retrieve all your buildings to know their identifiers)
date required query param
Date (YYYY-MM-DDTHH:mm:ss.SSSZ). The retrieved positioning data will come with the time zone sent on the param. If the param has not time zone the positioning data will retrieve in GMT+2.
E.g. 2017-05-25T21:55:00.000-03:00
date_end optional query param
Date (YYYY-MM-DDTHH:mm:ss.SSSZ). If you want to retrieve positioning data from a building of several days. The retrieved positioning data will come with the time zone sent on the param.
E.g. 2017-05-25T21:55:00.000-03:00
device_id optional query param
If you want to retrieve positioning data of a certain user
Returns
Returns an array of data objects.
Error Status Codes
Request url
https://dashboard.situm.es/api/v1/real_time/export/building_id?date=date&date_end=date_end&device_id=device_id
Curl
curl -H 'Content-Type: application/json' -H 'X-API-EMAIL: user@example.com' -H 'X-API-KEY: T9NP2lzk+jSI/Oi5DG6ODk57O0pZXdx4' "https://dashboard.situm.es/api/v1/real_time/export/1051?date=2017-10-30T00:00:00+01:00&date_end=2017-10-30T23:59:59+01:00&device_id=7176996664500"
Response body
device_id,time_sec,is_indoor,floor_id,position_x,position_y,yaw,lat,lng
7176996664500,"2017-10-30 13:54:46 +01:00",true,2767,60.6511116027832,28.488323211669922,51.0,42.872247508447984,-8.56353236300086
7176996664500,"2017-10-30 13:54:47 +01:00",true,2767,59.244937896728516,29.028274536132812,109.0,42.872244990694185,-8.563514249063184
7176996664500,"2017-10-30 13:54:48 +01:00",true,2767,64.55473327636719,26.63825798034668,45.0,42.87225760764783,-8.563583417086976
7176996664500,"2017-10-30 13:54:49 +01:00",true,2767,66.69261932373047,25.4797420501709,18.0,42.87226442545973,-8.563611695835444
7176996664500,"2017-10-30 13:54:50 +01:00",true,2767,67.21664428710938,24.938610076904297,18.0,42.87226837416932,-8.56361919034672
7176996664500,"2017-10-30 13:54:51 +01:00",true,2767,67.41446685791016,24.960824966430664,14.0,42.87226785887514,-8.563621523706614
7176996664500,"2017-10-30 13:54:52 +01:00",true,2767,67.54279327392578,24.990324020385742,12.0,42.8722673909765,-8.563623004311614
7176996664500,"2017-10-30 13:54:53 +01:00",true,2767,67.62701416015625,25.024307250976562,11.0,42.87226695438568,-8.563623944021879
7176996664500,"2017-10-30 13:54:54 +01:00",true,2767,67.6219482421875,25.004350662231445,11.0,42.8722671392886,-8.563623926713488
7176996664500,"2017-10-30 13:54:55 +01:00",true,2767,67.63739776611328,25.003761291503906,15.0,42.87226711963043,-8.563624114032525
7176996664500,"2017-10-30 13:54:56 +01:00",true,2767,67.60477447509766,24.934162139892578,15.0,42.87226778856729,-8.563623873585708
7176996664500,"2017-10-30 13:54:57 +01:00",true,2767,67.61869812011719,24.84785270690918,15.0,42.87226853054545,-8.563624230197188
7176996664500,"2017-10-30 13:54:58 +01:00",true,2767,67.60930633544922,24.80201530456543,14.0,42.872268951627476,-8.563624217461228