11 Use Webhooks

You can use webhook Endpoints for push notifications of content lifecycle and content publishing events.

See the following topics:

Configure Webhooks

You can use webhooks to have Oracle Content and Experience automatically post a notification based on asset events.

For example, you might want to post a notification to an application when new content is published, so that the application can consume the new content.

To create a webhook:

  1. After you sign in to the Oracle Content and Experience web application as an administrator, click Integrations in the Administration area of the navigation menu on the left.

  2. In the Integrations menu, click Webhooks.

  3. Click Create.
  4. Select the type of webhook you want to create:
    • Asset Lifecycle Webhook: Receive push notifications about asset lifecycle changes in a repository.
    • Asset Publishing Webhook: Receive push notifications about assets published or unpublished to a channel.
    • Site Publishing Webhook: Receive push notifications about site publishing.
  5. Enter a name and description for the webhook. This name appears as a heading for the posted conversation message.
  6. Enable the webhook.
  7. Provide information for webhook monitoring:
    • If you're creating an asset lifecycle webhook, select the repository you want to monitor for asset events.
    • If you're creating an asset lifecycle webhook, select the repository you want to monitor for asset events.
    • If you're creating a site publishing webhook, specify the name of the site you want to monitor for site events.
  8. Select the events you want to generate notifications.
  9. Select whether you want brief or detailed information about each event. For a publishing webhook, you can also select an empty notification.
    • For asset lifecycle webhooks, brief notifications include who triggered event, what was the event, what item was involved with the event, in which repository did the event occur, when did the event occur; detailed notifications include the same information listed in brief plus a list of all the fields in each content item or digital asset.
    • For asset publishing webhooks, brief notifications include the IDs of each published asset; detailed notifications include the same information listed in brief plus a list of all the fields in each published asset.
  10. Enter the target URL (endpoint) to which you want to post notifications.
  11. If the endpoint requires authentication, select what type of authentication, and then click Details to enter the authentication information.

    Oracle Content and Experience webhooks support the following options to configure Authentication for the webhook notification receiver:

    • None: The receiver does not require authentication.
    • Basic: The receiver requires Basic Auth.
    • Header: The receiver requires Secure Header.
  12. Click Save.

To delete a webhook, click Delete next to the webhook.

To edit a webhook, click Edit next to the webhook.

Monitor Webhook Events

As an administrator or developer, you can access a log of events posted to a Webhook. The Events Log displays the Object IDs, Event IDs, and Published dates and times for webhook activities in an Oracle Content and Experience instance.

To monitor Webhook events:

  1. After you sign in to the Oracle Content and Experience web application as an administrator or developer, click Integrations in the Administration area of the navigation menu on the left.
  2. In the Integrations menu, click Webhooks admin UI.
  3. On the Settings view for a webhook instance choose the option to open the Events log page.

    The Events log page displays list of all the events published to this webhook. Recent posts are shown at the top.


Description of webhook-log.jpg follows
Description of the illustration webhook-log.jpg

For each event, the log also shows its response status (Success or Failure). You can expand posted event to see details about notifications sent to a webhooks client.

The Oracle Cloud REST API for Activity Log provides the ability to search activities in Oracle Content and Experience. This API has the following endpoints:
  • Audit Log, which provides the details of activities and its related data.
  • Events, which provides the details of types and categories.

Receive Push Notifications from a Content Lifecycle Webhook

A content lifecycle webhook can send you push notifications about content lifecycle events in an Oracle Content and Experience repository for content items and taxonomies.

You can receive information about the following events from a content lifecycle webhook:

  • Content Item Created
  • Content Item Updated
  • Content Item Deleted
  • Content Item Approved
  • Content Item Published
  • Content Item Republished
  • Content Item Unpublished
  • Digital Asset Created
  • Digital Asset Updated
  • Digital Asset Deleted
  • Digital Asset Approved
  • Digital Asset Published
  • Digital Asset Republished
  • Digital Asset Unpublished
  • Collection Created
  • Collection Deleted

A respository manager can create a content lifecycle webhook with a REST API endpoint or on the Administration > Integrations > Webhooks > Settings page in the Oracle Content and Experience web interface. On the Settings page for a webhook, users can configure the following settings:

  • Name: A webhook name
  • Description: A webhook description
  • Status: An enabled or disabled status for the webhook. The default is disabled
  • Repository: A repository to scope events for the webhook
  • Events: A list of events for the webhook to send notifications
  • Target URL: The URL of the endpoint to which notifications should be posted
  • Authentication: A callback receiver security (None, Basic, or Header)
  • Payload: The type of payload to send to the endpoint. (Brief or Detailed)

Name, Description, Status, Target URL, and Authentication are standard settings for a webhook. For the repository setting, pick a repository for which you have Manager permission.

Receive Push Notifications from a Content Publishing Webhook

A content publishing webhook can send you push notifications for asset and taxonomy publishing events in Oracle Content and Experience.

You can receive information about the following events from a content publishing webhook:

  • Asset Published to Channel
  • Asset Republished to Channel
  • Asset Unpublished to Channel
  • Taxonomy Published
  • Taxonomy Republished
  • Taxonomy Unpublished
A channel manager can create a new content publishing webhook with a REST API endpoint or on the Administration > Integrations > Webhooks > Settings page in the Oracle Content and Experience web interface. This enables notifications about content published to the following channels:
  • Public or secure custom publishing channels
  • Publishing channels that Oracle Content and Experience creates for public or secure enterprise sites
You can receive notifications about the following activities in the scope of a channel:
  • Publish: A new content item, digital asset, or taxonomy is published.
  • Republish A new version of a content item, digital asset, or taxonomy is published.
  • Unpublish: A content item, digital asset, or taxonomy is unpublished.

Receive Push Notifications from a Site Publishing Webhook

A site publishing webhook can send you push notifications for site publishing events in Oracle Content and Experience.

A site manager can create a new site publishing webhook with a REST API endpoint or on the Administration > Integrations > Webhooks > Settings page in the Oracle Content and Experience web interface. This enables notifications about site publish, republish, and unpublish events.

Use Endpoints for Push Notifications of Content Lifecycle, Content Publishing, and Site Publishing Events

Oracle Content and Experience automatically delivers notifications to webhook endpoints about content publishing, content lifecycle, and site publishing events.

You subscribe to events for your webhooks to receive notification when the events happen, in the payloads for the endpoints. For example, if your endpoint subscribes to an event called DIGITALASSET_CREATED, when a digital asset is created in a repository you specified, the webhook payload can tell you the name of the webhook, what time the event happened, and who did the event.

You can use an endpoint to be notified when some action happens. Then Oracle Content and Experience calls that endpoint. You can create webhooks using REST endpoints, similar to other REST APIs. You need to specify a server URL for each webhook endpoint The GET, POST, PUT, and DELETE endpoints are hosted on the Oracle Content and Experience server, so the same host name, port, and system is the context for all the webhook endpoints.

You can create all the content items with the REST API or headless. You can also create webhooks using the REST API, and listen to the events.

The webhook endpoints are as follows:

GET /webhooks          Lists all webhooks.
POST /webhooks         Creates a webhook with the given information in the payload.
GET /webhooks/{id}     Reads a webhook with the given ID.
PUT /webhooks/{id}     Updates a webhook with the given information in the payload.
DELETE /webhooks/{id}  Deletes a webhook with the given ID.

Or you can create, configure, enable, or disable webhooks in the Oracle Content and Experience web UI at Administration > Integrations > Webhooks > Settings. See Configure Webhooks.

You can view event payloads, with Brief or Detailed output. Webhook payloads contain the following data:

  • Which webhook got invoked
  • What event got triggered (maybe CONTENTITEM_UPDATED or CHANNEL_ASSETPUBLISHED)
  • When the event was registered, and which user triggered it
  • What entity is the subject of the event:
    • For content lifecycle webhooks, it can be a content item or digital asset.
    • For content publishing events, it will be a list of the identifiers of all published content.

Webhooks have three different formats, as the following table describes.

Format Output
Brief Output includes only basic informatio in the payload. The output gives you details like what the action is, when it happened, in what repository, and who did the action.
Detailed Output includes all content information in the payload. The output gives you the whole content item data, in a URL that you specify.
Empty Available only for content publishing webhooks. If you specify Empty for the output, the payload contains only an identifier representing the publish session ID.

If the endpoint requires authentication, you can select what type of authentication, and then enter the authentication information.