Using the API, callbacks and hooks
Clevercast’s generic REST API is browsable and self-documented. To get started quickly, you can use the different API methods in your browser and inspect their response. When you write a client application, the API will behave in exactly the same way, except for authentication (when using the API in your browser, you're already authenticated). Each method of the browsable API is also documented, with a 'Details' panel providing additional information. If you require more information, don't hesitate to contact our support team.
Since the different aspects of our APIs (REST methodology, Basic Authentication, JSON data format) are widely used, a client application can be developed rapidly in most languages without an intermediate Clevercast client library.
The API requires HTTP Basic Authentication, except for the Direct Upload endpoints for user generated content, which use HMAC authentication. For basic authentication, use your user credentials (email and password) to authenticate, or create a specific API user. Note that in order to access the API, the user's role must have the Access API permission.
For some applications (Clevercast Webinar, Clevercast Learning) an application-specific API is available.
Callbacks and Hooks
Callbacks allow your client applications to receive data from Clevercast when a resource is updated or an event occurs. Currently, we provide callbacks for the Item resource. If you require additional callbacks, please contact our support team.
There are three ways in which HTTP POST requests to your client applications can be triggered:
- Workflow Task: a Send HTTP POST request task can be configured when the workflow starts or completes, or before or after any workflow action.
- OnUpdate or OnDelete hooks: the Hooks panel on the API page allows you to configure Clevercast to send a HTTP POST request every time an Item's (meta)data is updated and/or an Item is removed.
- Manually: when you've configured the OnUpdate hook, you can also trigger its execution manually (without having to make changes to the Item). Go to the Item page and select 'Trigger POST Item Hook' from the 'Developer menu'.
The request body contains the JSON formatted instance data of a given Item. The data POSTed is exactly the same as the data returned in response to a GET items instance request.