Guide for Extensions

3 Testbed Provider Services (Testbed to FIESTA-IoT)

3.2 TPS API Definition

The 1st Table below illustrates the main API primitives that support the Testbed Provider Services functionalities, while 2nd Table provides more details about each one of the functions that comprise the API.

List of primitives comprising the Testbed Provider Services API

<<interface>>

TpiServicesInterface

---

POST:getLastObservations (getLastObservationsPayload:JsonObject):List <SensorValue>

POST:getObservations (getObservationsPayload:JsonObject):List <SensorValue>



A Testbed SHALL implement methods of the Testbed Provider Services API as specified in 2nd Table below:

Testbed Provider Services API definition

Service Name

Input

Output

Info

getLastObservations

JsonObject getLastObservationsPayload

List <SensorValue>

This service provides the latest values of a specific Sensor list.

getObservations

JsonObject  getObservationsPayload

List <SensorValue>

This service provides the values of a specific Sensor list for a specific time period once.



Object Definition

The analysis of the JSON objects that are introduced in the previous section is provided below:

Definition of getLastObservationsPayload object:

{

    "sensorIDs": [<String> sensorIDs]

}

 

Definition of getObservationsPayload object:

{

     "sensorIDs": [<String> sensorIDs],

     "startDate": <Date> startDate,

     "stopDate": <Date> stopDate

}

Note: the Date has the following format "yyyy-MM-ddThh:mm:ss" and the start date precedes the stop date in time. If the startDate and the stopDate appear in other format, they have to be converted to the above one.