3 API format
3.1 REST (Representational State Transfer)
The ClickShare Base Units offer a web API implemented using HTTP and REST principles. This is a collection of resources,
with four defined aspects:
• the base URI for the web API, such as http://example.com/resources/
• the Internet media type of the data supported by the web API. This is often JSON, but it can be any other valid
Internet media type provided that it is a valid hypertext standard.
• the set of operations supported by the web API using HTTP methods (e.g., GET, PUT, POST, or DELETE).
• the API must be hypertext-driven.
3.2 Requesting information
Example: requesting the software version number of a particular ClickShare Base Unit:
request "GET /v1/Software/Version"
response {
“status”: “200”,
“message”: “GET successful”,
“data”: {
“key”: “/v1/Software/Version”,
“value”: “01.04.00.0574”
}
}
3.3 Changing a setting
Example: changing the display mode of the CSC Base Unit from “single” to “extended”:
request “PUT /v1.0/Display/Mode --data {“value”:”Extended”}”
response {
“status”:”200”,
“messages”: “PUT successful”,
“data”:
{
“key”: “/v1.0/Display/Mode”,
“value”: “Extended”
}
}
3.4 Feedback
If the response is OK, the key-value pair will be returned in JSON format. Both GET and PUT methods will be accompanied
by the HTTP status code:
• “200” means OK,
• “404” means the resource was not found,
• “500” means there was an internal server error.
The type of resource can be string, number, object, array or boolean.
3.5 Security
In the first release, the REST API will be offered over HTTP. Authentication is necessary to access the API and will
be offered via Digest access authentication.