Events

An event is an entity that represents an action that will be triggered when an user enters a certain location. More details here.
The event object
id integer
Event identifier
building_id integer
Building identifier (retrieve all you buildings to know their identifiers)
project_id (Deprecated) integer
(Deprecated, use building_id)
Building identifier (retrieve all you buildings to know their identifiers)
name string
Event name
created_at datetime
Time when the event was created
updated_at datetime
Last time when the event was updated
info text
Event aditional information
position object
Event trigger area position
Child attributes
floor_id integer
Floor identifier in which trigger area is situated
radius float
Trigger area radius in meters
georeferences object
Trigger area in geographic coordinates
The location data are represented in WGS84 coordinate system
Child attributes
lat float
Cartography latitude
long float
Cartography longitude
cartesians object
Trigger area in cartesian coordinates taking the bottomleft corner as the origin
More details here
Coordinates in meters
Child attributes
x float
x coordinate
y float
y coordinate
conversion_area object
Event conversion area position
Child attributes
floor_id integer
Floor identifier in which conversion area is situated
radius float
Conversion area radius in meters
georeferences object
Conversion area position in geographic coordinates
The location data are represented in WGS84 coordinate system
Child attributes
lat float
Geographic latitude
lng float
Geographic longitude
cartesians object
Conversion area position in cartesian coordinates taking the bottomleft corner as the origin
More details here
Coordinates in meters
Child attributes
x float
x coordinate
y float
y coordinate
custom_fields array of objects
List of custom key-value pairs. More details in Custom fields
Custom field attributes
key string
Custom field key
value string
Custom field value
Example Response
{
  "id": 76,
  "building_id": 98,
  "project_id": 98,
  "name": "Event name",
  "created_at": "2016-02-16T18:13:44.022+01:00",
  "updated_at": "2016-08-04T15:25:29.763+02:00",
  "url": null,
  "info": "<p>Event info</p>",
  "position": {
    "floor_id": 250,
    "radius": 11.1837716773103,
    "georeferences": {
      "lat": 42.8886484290569,
      "lng": -8.52551819273683
    },
    "cartesians": {
      "x": 216.681559574197,
      "y": 126.106652869099
    }
  },
  "custom_fields": [
    {
      "key": "active",
      "value": "false"
    }
  ],
  "conversion_area": {
    "floor_id": 250,
    "radius": 34.89,
    "georeferences": {
      "lat": 42.8892506378253,
      "lng": -8.52641422380898
    },
    "cartesians": {
      "x": 117.985,
      "y": 135.7
    },
  }
}

Returns the events of a building

An event refers to an area that has been associated with a certain information that will be shown to the users when they pass by. Events can only be defined inside a building (indoors), and they have a circular shape. Information is always an HTML snippet (text, images, videos, etc.) that has been introduced in the dashboard using a Rich Text Editor.
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
Returns an array of event objects.
Error Status Codes
Request url
https://dashboard.situm.es/api/v1/buildings/:building_id/events
*Deprecated: https://dashboard.situm.es/api/v1/projects/:building_id/events (supported until SDK 4.0)
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/buildings/:building_id/events"
Response body
[
  {
    "id": 77,
    "building_id": 98,
    "project_id": 98,
    "name": "Event name",
    "created_at": "2016-02-16T18:19:00.410+01:00",
    "updated_at": "2016-07-26T20:15:12.341+02:00",
    "url": null,
    "info": "<p>Event info</p>",
    "position": {
      "floor_id": 291,
      "radius": 12.3221733973755,
      "georeferences": {
        "lat": 42.8888868413015,
        "lng": -8.52564838397099
      },
      "cartesians": {
        "x": 192.280895960653,
        "y": 140.911549893047
      }
    },
    "custom_fields": [],
    "conversion_area": {
      "floor_id": 291,
      "radius": 7.91,
      "georeferences": {
        "lat": 42.8891948794203,
        "lng": -8.52600550402649
      },
      "cartesians": {
        "x": 148.41,
        "y": 150.78
      },
    }
  },
  {
    "id": 76,
    "building_id": 98,
    "project_id": 98,
    "name": "Event name",
    "created_at": "2016-02-16T18:13:44.022+01:00",
    "updated_at": "2016-08-04T15:25:29.763+02:00",
    "url": null,
    "info": "<p>Event info</p>",
    "position": {
      "floor_id": 250,
      "radius": 11.1837716773103,
      "georeferences": {
        "lat": 42.8886484290569,
        "lng": -8.52551819273683
      },
      "cartesians": {
        "x": 216.681559574197,
        "y": 126.106652869099
      }
    },
    "custom_fields": [
      {
        "key": "active",
        "value": "false"
      }
    ],
    "conversion_area": {
      "floor_id": 250,
      "radius": 34.89,
      "georeferences": {
        "lat": 42.8892506378253,
        "lng": -8.52641422380898
      },
      "cartesians": {
        "x": 117.985,
        "y": 135.7
      },
    }
  }
]