Real Time

Real time refers to a service provided by Situm that allows to retrieve the location of every user in a building in real time. More details here.
The feature object
We provide the position of every user in GeoJSON format.
type string
The value is always Feature
geometry object
GeoJSON object. More details in Feature Objects
Child attributes
type string
The value is always Point. It must be a single position
coordinates array
Geographic coordinates
The location data are represented in WGS84 coordinate system
[ longitude, latitude ]
id integer
Feature identifier
properties object
GeoJSON object. More details in Feature Objects
Child attributes
floor_id integer
Floor identifier in which the user is positioned
time datetime
Last time when the user was positioned
yaw float
User rotation angle relative to earth in radians
More details here
local_coordinates array
Cartesian coordinates taking the bottomleft corner as the origin
More details here
Coordinates [ x, y ] in meters
Example Response
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          42.872386681944604,
          -8.562874917780633
        ]
      },
      "id": "84061156536025",
      "properties": {
        "floor_id": 257,
        "time": "2016-04-19T16:29:42.000Z",
        "yaw": 4.36871,
        "local_coordinates": [
          4.33366,
          21.7118
        ]
      }
    },
    ...
  ]
}

Get the real-time position of every user in a building

Periodically (e.g. every second), our system collects and stores the position of every user. This method provides the position of every user in a building in real time. 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
building_id required path param
Building identifier (retrieve all your buildings to know their identifiers)
Returns
Error Status Codes
Request url
https://dashboard.situm.es/api/v1/real_time/building/: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/real_time/building/:building_id"
Response body
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          42.872386681944604,
          -8.562874917780633
        ]
      },
      "id": "84061156536025",
      "properties": {
        "floor_id": 257,
        "time": "2016-04-19T16:29:42.000Z",
        "yaw": 4.36871,
        "local_coordinates": [
          4.33366,
          21.7118
        ]
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          42.872386681944603,
          -8.562874917780634
        ]
      },
      "id": "84061156536026",
      "properties": {
        "floor_id": 257,
        "time": "2016-04-19T16:29:42.000Z",
        "yaw": 4.36871,
        "local_coordinates": [
          4.33366,
          21.7118
        ]
      }
    }
  ]
}