Skip to content

Subscribing to Events

In order to invoke your integration, you must be subscribed to an event and have a handler that is listening for that event. Integrations remain at rest until receiving an event from another application (i.e. Composer, WebSked) to which it is subscribed (more on this later). If no integrations are subscribe to that event, the event is skipped.

Event Menu

The Event Menu brings Arc XP’s Content, Commerce, and Experience applications together. Bookmark it so you can easily find it!

IFX stores a mapping of events to integrations. In order to receive events and invoke your integration, you must be subscribed to them. For each event you wish to subscribe to, you will specify the integration name to invoke when the event is received.

Review the menu and make note of the events you want to receive. Each of the events will provide a description and an example payload it will send.

At a high level:

  1. View the menu of events
  2. Select the events you want to receive
  3. Use an API to subscribe to an event and specify which integration to invoke
  4. Trigger and receive the event to your integration

Managing Event Subscriptions

You can manage subscriptions through APIs (outlined below) or the IFX CLI.

CLI Guide

Navigate to the IFX CLI page for instructions on getting started.

API Guide

Subscribing to an Event

In order to receive events and invoke your integration, you must be subscribed to them.

Send a POST request to the /admin/events/subscriptions endpoint to subscribe and specify the integration that should be invoked when the event is received.

Terminal window
curl --location 'https://api.[org].arcpublishing.com/ifx/api/v1/admin/events/subscriptions' \
--header 'Authorization: Bearer {yourtoken} ' \
--header 'Content-Type: application/json' \
--data '{
"eventName": "story:update",
"enabled": true,
"integrationName": "myIntegrationName"
}'

Unsubscribing from an Event

Send a PUT request to the /admin/events/subscriptions endpoint to unsubscribe from an event by setting enabled to “false”. This will prevent that event from invoking your integration, and you can set it back to “true” if and when you need to.

Terminal window
curl -X PUT --location 'https://api.[org].arcpublishing.com/ifx/api/v1/admin/events/subscriptions' \
--header 'Authorization: Bearer {yourtoken} ' \
--header 'Content-Type: application/json' \
--data '{
"eventName": "story:update",
"enabled": false,
"integrationName": "myIntegrationName"
}'

Viewing Your Event Subscriptions

Send a GET request to the /admin/events/subscriptions endpoint to view your organization’s existing subscriptions (or just view in your browser). Note that these results are cached for 5 minutes.

Terminal window
curl -X GET --location 'https://api.[org].arcpublishing.com/ifx/api/v1/admin/events/subscriptions' \
--header 'Authorization: Bearer {yourtoken} ' \
--header 'Content-Type: application/json' \


Have a feature request or suggestion? Let us know on Our Ideas Portal.