The SDK comes with a few examples that you can look at to better understand how a workspace integration works:
This guide will walk through the steps necessary to get the examples up and running in a few minutes.
Common to all the examples are the following steps:
When you create an integration you must provide a manifest that describes what your integration does, what developer API scopes, XAPI commands, events and statuses it needs access to.
You can create the manifest file yourself or use the visual editor.
Each of the examples have a corresponding manifest file under the resources/manifests directory.
A workspace integration is created in the Control Hub Workspaces Integrations page using the manifest "Upload integration" option:
Select the manifest file to upload and store the returned OAuth Client ID and OAuth Client Secret:
The OAuth Client ID and secret will be used when you start the example.
After the integration is created it must be activated on the integration details page:
The activation wizard provides an activation code (JWT):
You know have the three things you need:
- OAuth client ID
- OAuth client secret
- Activation code
Let's move on to the examples...
This example displays a rating survey on the devices after a call disconnects using:
- The CallDisconnect event to detect when a call has ended,
- The UserInterface.Message.Rating.Display command to show a rating dialog on the device user interface and
- The UserInterface.Message.Rating.Response event to capture the rating.
- Upload the callsatisfactionsurvey.json manifest and capture the OAuth clientId, secret and activation code (JWT) as described above.
- Run the example providing the clientId and secrets as program arguments.
- The first time the example is run, you will need to provide the activation code as a command line input.
- Go to the root project directory and run
mvn clean install -P callsatisfactionsurvey
- Start the example by running
java -jar examples/target/callsatisfactionsurvey.jar <clientId> <clientSecret>
This example displays a prompt on the device if the number of people detected by the device exceeds the capacity stored for the workspace in Control Hub.
- The RoomAnalytics.PeopleCount.Current status is used to track the people count,
- The Workspaces GET API is used to fetch the capacity,
- The UserInterface.Message.Alert.Display command shows an alert on the device.
- Upload the roomcapacitymonitor.json manifest and capture the OAuth clientId, secret and activation code (JWT) as described above.
- Run the example providing the clientId and secrets as program arguments.
- The first time the example is run, you will need to provide the activation code as a command line input.
- Go to the root project directory and run
mvn clean install -P roomcapacitymonitor
- Start the example by running
java -jar examples/target/roomcapacitymonitor.jar <clientId> <clientSecret>
This example captures environmental sensor data from the devices:
- Upload the environmentaldata.json manifest and capture the OAuth clientId, secret and activation code (JWT) as described above.
- Run the example providing the clientId and secrets as program arguments.
- The first time the example is run, you will need to provide the activation code as a command line input.
- Go to the root project directory and run
mvn clean install -P environmentaldata
- Start the example by running
java -jar examples/target/environmentaldata.jar <clientId> <clientSecret>
- Due to caching in the Webex cloud, it might take up to 60 minutes for all the devices in your organization to pick up on changes to your uploaded manifests. If you are testing with a specific device, then a reboot will speed up the process.
- Note that a workspace integration will (if nothing else is specified) get access to all workspaces and devices in your organization. To avoid causing problems when running the examples, we recommend to limit the integration access to a location with only the devices you want to test.