servIoTicy allows for the interaction with the platform through protocols that are not HTTP/REST. Support for MQTT, STOMP-over-TCP and STOMP-over-WS is provided. This page describes how to leverage this protocols for easy interaction with the platform.

They can be used in three different forms:


Information for communicating with the platform using MQTT/WS/TCP:


Important: Notice that the topics used in MQTT and STOM follow a different format. More information found here (MQTT) and here (STOMP)

Subscribing to data streams:

We would POST the following JSON document to the URL:

Note that the filed “destination” is here the API_TOKEN of the subscriber.
Example topic:

Client-Server interaction:

REST API is mapped on top of a topic using the following structure (note the use of an optional “messageId” field to match queries and responses):

An example of how to to list all the SOs belonging to a user:

An example of how to push data to the platform:

Code samples

A sample python code for pushing data to the platform (based on Paho):

The actual Node.js multi-protocol bridge between the broker and the platform:

Note that it uses STOMP+TCP, and therefore uses a topic notation that is: “/topic/field1.field2.field3….”