Streams API is a two-way, message-based .JSON protocol used to sends commands to the scanner and get different states.
It is a domain-based, human-readable and machine-parsable protocol that enhances the two-way communication between your system and ProGlove connectivity devices.
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 ProGlove connectivity device.
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