Skip to main content

Data Structure

WebhookSubscription

An object that represents a submitted webhook subscription. Each WebhookSubscription object defines what event should be monitored and where the corresponding event payload should be delivered when the event occurs.
ParameterTypeDescription
idID!The webhook subscription record ID.
labelString!The webhook subscription record label.
triggerEventWebhookTriggerEvent!An event ID that triggers this webhook.
targetUrlString!An endpoint URL where the webhook will be sent.
statusWebhookSubscriptionStatus!A status of the webhook subscription.
createdAtInt!The timestamp when the subscription was created.

WebhookTriggerEvent

An enumeration that defines the set of available options to which webhook subscription can be bound. Available options:
Trigger event nameDescription
USER_REGISTERED_TO_TRAININGTriggers when user context have enrolled on LearningPath.
USER_COMPLETED_TRAININGTriggers when user context have complete LearningPath.
USER_REGISTERED_TO_LIVE_SESSIONTriggers when user context have registered to LiveSession.
USER_ATTENDED_TO_LIVE_SESSIONTriggers when user context have been marked as attended at the LiveSession.
LEARNING_PATH_NEW_REVISIONTriggers when LearningPath have receive a new published revision.
CERTIFICATE_EXPIREDTriggers when earned user Certificate have been expired.
In addition, the Opigno Enterprise API provides a time-based trigger definitions:
Trigger event nameDescription
*_BEFORE_LIVE_SESSION_STARTSTriggers when LiveSession is about to start in period of time.
*_BEFORE_CERTIFICATE_EXPIRETriggers when user Certificate is about to expire in period of time.

Queries

listWebhookSubscriptions

  • The API user context must have AUTHENTICATED scope to access webhook subscriptions. Anonymous users cannot retrieve this data.
  • The API user context must have permission to view webhook subscriptions.
  • The API user context must be present and valid - otherwise, access is denied.
The following arguments can be used in the query:
ArgumentTypeDescription
triggers[WebhookSubscription]Optional filter by trigger event.
query listWebhookSubscriptions {
  listWebhookSubscriptions(triggers: [USER_REGISTERED_TO_LIVE_SESSION, USER_ATTENDED_TO_LIVE_SESSION, LEARNING_PATH_NEW_REVISION, ONE_DAY_BEFORE_LIVE_SESSION_STARTS]) {
    response {
      id
      label
      triggerEvent
      targetUrl
      status
      createdAt
    }
    errors
  }
}
The listWebhookSubscriptions query supports the same advanced features as other catalog queries: Common error scenarios and solutions:
  • 401 Unauthorized: Ensure you’re using a valid authentication token with AUTHENTICATED scope
  • 403 Forbidden: Verify your user account has the necessary permissions to access webhook subscription data