1.1 Documentation for the ClickShare REST API
Versions
Documentation for each supported version can be accessed at {baseUnitAddress}:4003/api-docs. To get a list of all supported versions of the API for this Base Unit, call {baseUnitAddress}:4003/supportedVersions. To get the latest version, call {baseUnitAddress}:4003/currentVersion. Note that only the major version is required when calling the API endpoints (for example "v2"). The minor version is for informational purposes only. It can be used to identify when a feature was introduced, if your units are not all using the same firmware version.
Authentication
The API endpoints are configured with basic authentication. When executing the example curl commands, an extra parameter --user is required. See the curl man page for more info on the format of the credentials. Note that curl uses basic authentication by default, so the --basic parameter is optional.
Self signed certificate
Before executing the example curl commands, it is recommended to replace the default self-signed certificate with a trusted one to ensure secure HTTPS connections. The API is accessible only over HTTPS, and without replacing the certificate, most tools will raise certificate warnings. While it is possible to bypass these warnings in curl and other tools, using proper certificates is the preferred approach to avoid the need for such configurations.
Subscribing to endpoints (Server-Sent Events)
Instead of continuously polling a resource, one can subscribe to it, in order to lower the bandwidth used. A request can set the request header "accept" to "text/event-stream". This accept type will trigger the unit to keep the connection open. The unit will then send updates whenever the resource gets updated, or every 90 seconds to keep the connection alive. The sent data will be the application/json data, prepended with "data: " and appended with 2 newlines "\n\n". Complete package: "data: {Json data} \n\n"