API/Cloud Core Protocol

From ickStream Wiki
Revision as of 08:50, 24 July 2014 by Erland (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



The Cloud Core provides a JSON-RPC interface with the functions described on the following page, the endpoint url for this interface is:
A specific version of the Cloud Core protocol can always be accessed by appending the protocol version number at the end of the url, for example to use version 1.0 of the protocol the following url can be used:

The getProtocolVersions method can be use the check supported protocol versions and based on the result the appropriate URL to use can be decided. To be able to survive future changes of the protocol, a client should a URL with the appended version number. Using the URL without version number will be the same as using the URL with the maximum supported version number.

The most of the methods are protected by a OAuth Authorization header, so to be able to use it the Controller first needs to have a valid OAuth access token.

The "Authorization" header can be composed as:

  • Bearer <accessToken>

If the access token represent a user and not a device the available methods are a bit more limited, it's basically possible to get information about current user, list devices for current user and request a device registration token and remove a device.

To get a user access token, you need to let the user authenticate in a web view as described on: User authentication and registration. The purpose of a user access token is that there are some operations that aren't accessed from a device, one example can be an administration web site, but also that you need it to be able to request a device registration token using the createDeviceRegistrationToken method to be able to register the device itself with the addDevice method to get a device access token.

After the device is registered and you have got a device access token, you should use the device access token and discard the user access token. The user access token is typically never stored persistently in an application, it's only the device access token which needs to be stored persistently in the local storage of the application.

Generic methods

Service methods

Device related methods

User related methods

Service related methods

Sample responses

See the separate samples page

Personal tools