Webhooks
Webhooks let you receive notifications about certain events without polling the API.
You have to configure a URL that will be called by our system with a GET
HTTP request for each event type you want to listen to with the endpoint PUT /api/v6/webhooks/{eventType}
These query parameters will be sent to the url you specify:
- eventType : Type of event, see list below
- resourceId : Id of the object that triggered the event
- userId : Id of the user owning the object that triggered the event
- date : Unix timestamp
Example:
https://www.your-app.com/hooks?eventType=DATA_CONNECTION_CONNECTED&resourceId=d0e497f1-6052-4f0d-b876-d4e6d7cf25bc&date=1609459200
List of possible event types
Event Type | Resource Id | Description |
---|---|---|
DATA_CONNECTION_AUTH_REQUIRED | DataConnection | The data connection is created and requires an authorization from the user |
DATA_CONNECTION_CONNECTING | DataConnection | The user has begun the authorization procedure |
DATA_CONNECTION_CONNECTED | DataConnection | The data connection is ready to be used for data synchronization |
DATA_CONNECTION_AUTH_ERROR | DataConnection | The user needs to re-authorize the data connection |
DATA_CONNECTION_DISCONNECTED | DataConnection | You asked to disconnect the data connection |
DATA_SYNC_QUEUED | DataSync | A data synchronization has been asked |
DATA_SYNC_AUTH_ERROR | DataSync | A data synchronization ended with an authorization error. The corresponding data connection status also change to AUTH_ERROR. The user needs to re-authorize the connection |
DATA_SYNC_FETCH_ERROR | DataSync | A data synchronization ended with an error. This might be due to a temporary error. You should retry the synchronization |
DATA_SYNC_FETCHING | DataSync | A data synchronization has been started |
DATA_SYNC_SUCCESS | DataSync | A data synchronization ended successfully |
REPORT_SUBMITTED | Report | The report request has been sent successfully |
REPORT_PROCESSING | Report | The report is being generated |
REPORT_DONE | Report | The report generation has ended successfully |
REPORT_DONE_NO_DATA | Report | The report generation has ended successfully but there is no data in the report |
REPORT_CANCELLED | Report | The report generation has been canceled or has failed |