Guide for Extensions

6 Testbed Provider Services (Testbed to FIESTA-IoT)

6.1 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): 

String annotatedMeasurements,

POST:getObservations (getObservationsPayload:JsonObject):

String annotatedMeasurements,

POST:pushLastObservations (pushLastObservationsPayload:JsonObject):String

POST:stopPushOfObservations (stopPushOfObservationsPayload:JsonObject):String



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

Testbed Provider Services API definition

The accepted content types (Content-Type) mentioned above are:
• application/ld+json
• application/n-quads
• application/n-triples
• application/n3
• application/rdf+json
• application/rdf+thrift
• application/rdf+xml
• application/trig
• application/trix
• application/trix+xml
• application/turtle
• application/x-trig
• application/x-turtle
• null/rdf
• text/csv
• text/n-quads
• text/n3
• text/nquads
• text/plain
• text/rdf+n3
• text/trig
• text/turtle



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]

}

 

Example:

{

    "sensorIDs": [

        "http://testbed.test.com#sensing_device2",

        "http://testbed.test.com#sensing_device1"

    ]

}

 

Definition of getObservationsPayload object:

{

     "sensorIDs": [<String> sensorIDs],

     "startDate": <Date> startDate,

     "stopDate": <Date> stopDate

}

Note: the Date has ISO 8601 date and time format ("yyyy-MM-ddThh:mm:ss") in UTC 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.

Definition of pushLastObservationsPayload object:

{

"sensorIDs": [<String> sensorIDs],

    "endpointURI": <String> theEndpointURI

}

 

Example:

{

    "sensorIDs": [

        "http://testbed.test.com#sensing_device2",

        "http://testbed.test.com#sensing_device1"

    ],

    "endpointURI": "https://platform.fiesta-iot.eu/dms/pushObservationsProxy"

}

Definition of stopPushOfObservations object:

{

    "sensorIDs": [<String> sensorIDs],

    "endpointURI": <String> theEndpointURI

}

 

Example:

{

    "sensorIDs": [

        "http://testbed.test.com#sensing_device2",

        "http://testbed.test.com#sensing_device1"

    ],

    "endpointURI": "https://platform.fiesta-iot.eu/dms/pushObservationsProxy"

}