Streams API
Streams API is a two-way, message-based .JSON protocol based on the USB CDC integration path.
It is a domain-based, human-readable and machine-parsable protocol that enhances the two-way communication between your system and the ProGlove Gateway.
Streams API enables features like Multi-pairing and MARK Display integration.
Streams API consists of many one-way Streams of Event data:
Events specific to a use case
Events that publish data towards the customer app
Events that can be commands the customer app sends towards the Gateway.
![StreamsIndex.png](image/uuid-d8a3b76b-598d-8a72-dcd6-50c99b7650c4.png)
The event data is encoded as simple flat JSON messages:
{ "api_version": "1.0", "event_type": "scan", "event_id": "02114da8-feae-46e3-8b00-a3f7ea8672df", "time_created": 1546300800000, "scan_code": "Hello, World!", "device_serial": "MDMR000000064", "gateway_serial": "PGGW000000058" }
Each message contains at least:
api_version
- the version of the APIevent_type
- the type of the stream eventevent_id
- the identifier to refer to the command in case of error or responsedevice_serial
- identifies the scanner concerned by the commandtime_created
- the UNIX time stamp in milliseconds when the message was created client-side
Note
Every Streams API message coming from the Gateway is terminated by a Line Feed character.