API Control Workflow Example¶
The workflow presented in the following section is an example of how to use the MobileConnect API. It doesn’t necessarily represent the latest state of the full MobileConnect API function set. In fact, this example includes the set of functions introduced in MobileConnect v 1.0 (implemented with the MobileConnect Manager v 1.3.0). Even if a function from this example is deprecated, it will be still supported in all future releases.
Please visit the MobileConnect API specification for further information including command and response examples.
Application Workflow in Manager Mode¶
You can devise your own application flows using the MobileConnect API. One example workflow for generating a new QR code in Manager mode on a digital signage display for a scheduled meeting is depicted in the flow chart below.
API Command Examples¶
In this section you can find all communication calls using cURL for the workflow example in the previous section. You can adapt this to your own setup and requirements.
The calls have to be performed once at the transition from Room Available State to Room Occupied State or if a subsequent booking occurs (Room Occupied State to Room Occupied State).
Note
All MobileConnect API calls require an HTTP Authorization request header as basic authorization.
For all calls you can either use your Manager URL or the IP address of your Manager.
Make sure to use the correct HTTP method (GET/POST) for the respective request
Note
The information about stationID
and channelIndex
used in the API/cURL calls below should be obtained in advance either by checking the details within your MobileConnect Manager web interface or by requesting the list of the Stations and their channels, following the MobileConnect API specification.
Check if the MobileConnect Station is connected/available.
cURL command:
curl -k -H "Authorization: Basic {your token here}" --request GET https://{your manager url/ip address here}/public/api/v1.0/stations/{stationId}/connectionState
Example:
curl -k -H "Authorization: Basic OlpWbzlWYS9DQ2ZLVmZYZWxHY3NRbnpRdzJrU2RNT1ZOUUdTdjJOV2NoN2M9" --request GET https://manager.mobileconnect.tld/public/api/v1.0/stations/1100000251/connectionState
Expected Response:
{"connectionState":"Connected"}
Regenerate a QR code at the beginning of a new booking.
Note
If you regenerate a QR code, all currently listening streaming users will be disconnected from the stream and shown a notification that the channel is not available anymore and they have to scan the new QR code.
cURL command:
curl -k -H "Authorization: Basic {your token here}" --request POST https://{your manager url/ip address here}/public/api/v1.0/stations/{stationId}/channels/{channelIndex}/qrcode
Example:
curl -k -H "Authorization: Basic OlpWbzlWYS9DQ2ZLVmZYZWxHY3NRbnpRdzJrU2RNT1ZOUUdTdjJOV2NoN2M9" --request POST https://manager.mobileconnect.tld/public/api/v1.0/stations/1100000251/channels/0/qrcode
Expected Response Action:
Channel ID and QR Code have changed. You can crosscheck this manually by looking for the specific Channel Details of the related MobileConnect Station using the MobileConnect Manager.
Download a new QR code to be displayed on the digital signage display.
cURL command:
curl -k -H "Authorization: Basic {your token here}" --request GET https://{your manager url/ip address here}/public/api/v1.0/stations/{stationId}/channels/{channelIndex}/qrcode.{format}
Example:
curl -k -H "Authorization: Basic OlpWbzlWYS9DQ2ZLVmZYZWxHY3NRbnpRdzJrU2RNT1ZOUUdTdjJOV2NoN2M9" https://backend.mobileconnect.tld/public/api/v1.0/stations/1100000251/channels/0/qrcode.png --output qrcode.png
Expected Response:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12424 0 12424 0 0 12424 0 --:--:-- --:--:-- --:--:-- 72232
Example Display Content¶
Here are few examples how to display the information for an assistive listening streaming channel.
Content example (light scheme).
Content example (light scheme).
Content example (dark scheme).