Cloud Elements supports events via polling or webhooks depending on the API provider. For more information about our Events framework, see Events Overview.
Supported Events and Resources
Cloud Elements supports polling events for Microsoft OneDrive. After receiving an event, Cloud Elements standardizes the payload and sends an event to the configured callback URL of your authenticated element instance.
You can set up polling for the events
resource. You can also copy the events
configuration to poll other resources. See Configure Polling Through API for more information.
Configure Polling Through the UI
To configure polling through the UI, follow the same steps to authenticate an element instance, and then turn on events. Select the resources to poll, and then click Create Instance. For more information, see Authenticate an Element Instance with Events (UI) or the element-specific authentication topic.
Configure Polling Through API
Cloud Elements currently supports events via polling or webhooks depending on the endpoint.
- Polling is a mechanism where Cloud Elements executes the configured query every
n
minutes and captures the changed information. - Webhooks are when the provider lets Cloud Elements know what information has changed. Note that additional endpoint setup may be required prior to creating your Element Instance.
If you would like to see more information on our Events framework, see Events Overview.
In order to enable polling, add these extra configurations to your instance JSON:
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.poller.configuration": "<SEE_BELOW>"
instance JSON with polling events enabled:
{
"element": {
"key": "onedrivev2"
},
"providerData": {
"code": "Code on Return the URL"
},
"configuration": {
"oauth.api.key": "<INSERT_ONEDRIVE_CLIENT_ID>",
"oauth.api.secret": "<INSERT_ONEDRIVE_CLIENT_SECRET>",
"oauth.callback.url": "https://www.yourcallbackurl.com/oauth2callback",
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>"
},
"tags": [
"<INSERT_TAGS>"
],
"name": "<INSERT_INSTANCE_NAME>"
}