Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Introduction

Webhooks are HTTP-POST json format data, sent to application endpoints, that trigger actions based on content. A source application (such as onePortal or Azure AD) can implement the sending of webhooks in response to specific actions, such as the creation or update of a user/item's data or triggered by another query within the application.

A REST interface receives the webhook, conducts a procedure based on its content and provides a response.Image Removed

...

Graph 1: Webhook functionality

...

The integrated service called with the webhook has access rights to the identity service API. The API has endpoints for multiple different id services (such as Users, Groups and Files). The webhook sent in response to a user's email being changed might look like this:

...

Example webhook
true
collapse
Code Block
{
	"id":"IDNUMBER1234",
	"entityType":"USER",
	"eventType":"UPDATE",
	"timestamp":"2019-01-01T00:00:00Z"
}

...

The integrated service receives the above webhook. It will, based on this, run the following processes:

  1. Retrieve the User data for user id "IDNUMBER1234"

  2. Expect the commercial service to have a matching entity (preferably with an external id matching the source application id)

  3. Map and format a HTTP call to the commercial system's specifications.

  4. Update the commercial entity with a HTTP PATCH call.

  5. Provide a response based on the success of these processes.

The Response

Typically the integrated service should provide an HTTP response to the webhook. This might be as simple as a "200 - OK" message, or a full data packet fetched in response to the triggering entity. Depending on what the source application requires, the integrated service should provide.

...