SDI 4 Apps - Uptake of open geographic information through innovative services based on linked data

Important improvements of SensLog application were made in last period. New version of database model is utilized now. The database model was improved using table partitioning for largest tables. But improvements seen by users can be found in SensLog API. That was open for user applications running on other servers.
Most important services and methods will be described in following table. Rest of services can be found in Deliverable D3.3.1


Controller Servlet

ControllerServlet allows user to login to SensLog and to send further requests.

URL
/ControllerServlet
Method Functionality Format
POST Request provides users to log in the SensLog KVP plain-text

Important note:
Header of the POST request has to contain: Content-Type: application/x-www-form-urlencoded

Parameter Format Role
username plain-text Username of current user
password plain-text Password of current user

Example of logging payload:
username=test&password=demo


Feeder Servlet

FeederServlet allows user to insert observations, positions and alerts.

URL
/FeederServlet?Operation=operationName
Method Functionality Format
GET Provides insertion of main collected objects URL encoded

InsertObservation

URL
/FeederServlet?Operation=InsertObservation
Method Functionality Format
GET Provides inserting of new observation for combination of sensor and unit into database. Return true if observation was successfully inserted, false in all other cases. URL encoded plain text
Parameter Format Role
value Double precision Measured value (mandatory)
date Time stamp (ISO 8601) Timestamp of measured value (e.g. 2015-07-15 12:00:00+0200) (mandatory)
unit_id Numerical value Identifier of unit (mandatory)
sensor_id Numerical value Identifier of sensor (mandatory)

InsertPosition

URL
/FeederServlet?Operation=InsertPosition
Method Functionality Format
GET Provides inserting of new position of the unit into database, position can be inserted only in WGS-84 coordinates. Return true if position was successfully inserted, false in all other cases. URL encoded plain text
Parameter Format Role
lat Double precision Latitude (mandatory)
lon Double precision Longitude (mandatory)
alt Double precision Altitude in meters (optional)
speed Double precision Speed of the unit (optional)
unit_id Numerical value Identifier of unit (mandatory)
date Timestamp (ISO 8601) Timestamp of measured value (e.g. 2015-07-15 12:00:00+0200) (mandatory)
dop Numerical value Dilution of precision (optional)

InsertAlertEvent

URL
/FeederServlet?Operation=InsertAlertEvent
Method Functionality Format
GET Provides inserting of new alert event that was detected in the sensor network into database, Return true if event was successfully inserted, false in all other cases. URL encoded plain text
Parameter Format Role
alert_id Numerical value Identifier of alert (mandatory)
unit_id Numerical value Identifier of unit (mandatory)
date Timestamp (ISO 8601) Timestamp of measured value (e.g. 2015-07-15 12:00:00+0200) (mandatory)

Data Service

Data Service provides information about units and positions of units

URL
/DataService?Operation=operationName
Method Functionality Format
GET Provides detailed information about sensor units JSON

GetUnits

URL
/DataService?Operation=GetUnits
Method Functionality Format
GET Provides detailed information about each units connected to login user. Response contains connected sensors, first and last time stamp of entered observation, last positions of units. JSON

GetUnitsList

URL
/DataService?Operation=GetUnitsList
Method Functionality Format
GET Provides basic information about each units connected to login user. Response contains identifier of each unit and its description. JSON

GetPositions

URL
/DataService?Operation=GetPositions
Method Functionality Format
GET Request provides users specified number of last positions of all units in current group. JSON
Parameter Format Role
user Text Identifier of user group
limit Numeric value Number of positions to receive

GetLastPositions

URL
/DataService?Operation=GetLastPositions
Method Functionality Format
GET Request provides user last positions of all units in user group. JSON

GetLastPositionsWithStatus

URL
/DataService?Operation=GetLastPositionsWithStatus
Method Functionality Format
GET Request provides user information about alert events and other attributes in addition to previous GetLastPositions request. JSON

GetTracks

URL
/DataService?Operation=GetTracks
Method Functionality Format
GET Request returns entered number of trajectory geometries of all moving units in user group. URL encoded plain text
Parameter Format Role
limit Numerical value Number of tracks to receive

GetRecentTracks

URL
/DataService?Operation=GetRecentTracks
Method Functionality Format
GET Request returns trajectory geometries of all moving units in user group. URL encoded plain text

Sensor Service

SensorService provides information about sensors and enables to get measured or processed data.

URL
/SensorService?Operation=operationName
Method Functionality Format
GET Provides detailed information about sensors and provides methods to get sensor data. JSON

GetSensors

URL
/SensorService?Operation=GetSensors
Method Functionality Format
GET Request returns list of sensors connected to entered unit. JSON
Parameter Format Role
unit_id Numerical value Identifier of unit (mandatory)

GetObservations

URL
/SensorService?Operation=GetObservations
Method Functionality Format
GET Request provides access to measured or processed observations for entered unit-sensor pair and entered time range. If user doesn’t enter time range, servlet returns all available observations for entered unit-sensor pair. Another optional parameter is trunc that executes average of values for entered epoch (hour, day, week,…). JSON
Parameter Format Role
unit_id Numerical value Identifier of unit (mandatory)
sensor_id Numerical value Identifier of sensor (mandatory)
from Timestamp (ISO 8601) Time stamp of beginning time range (optional)
to Timestamp (ISO 8601) Time stamp of end time range (optional)
trunc Text Average epoch (optional)

Alerts Service

AlertService provides information about alerts events that arrived in sensor network. Methods allow user to get description of potential alerts connected to specific unit and list of arrived alert events including solving state.

URL
/AlertService?Operation=operationName
Method Functionality Format
GET Provides information about alerts events that arrived in sensor network. JSON

GetAlerts

URL
/AlertService?Operation=GetAlerts
Method Functionality Format
GET Request provides list of potential alerts for entered unit. JSON
Parameter Format Role
unit_id Numerical value Identifier of unit (mandatory)

GetAlertEventsByTime

URL
/AlertService?Operation=GetAlertEventsByTime
Method Functionality Format
GET Request provides list of arrived alert events for specified unit and specified time range. JSON
Parameter Format Role
unit_id Numerical value Identifier of unit (mandatory)
from Timestamp (ISO 8601) Time stamp of beginning time range (optional)
to Timestamp (ISO 8601) Time stamp of end time range (optional)
Share this: