Creating a Webhook in Box for Event Subscription

New comments and deleted items, do not reflect immediately in the SearchUnify index. A recrawl is needed to capture the changes. A method to keep your Box data in sync with the index is to enable event subscription, which involves creating a webhook.

The webhook works on files and folders. It updates the index when files and folders are deleted or added. It also updates the index when new comments are added. However, the webhook currently has no way to find out when a comment is deleted. It means that deleted comments remain in the SearchUnify index. This is a known issue and it will be fixed in the coming releases.

Create an App in Box

  1. Visit https://app.box.com/developers/console. Log in if prompted.

  2. In the My Apps section, click Create New App.

  3. Select Custom App.

  4. Select User Authentication (OAuth 2.0) and give your app a Name. Click Connect.

  5. The app has been created. On the app's Configuration tab, scroll down to the Application Scopes section and check Manage webhooks. Then, click Save Changes.

  6. Switch to the Webhooks tab and click Create Webhook. Select V1 from the dropdown.

  7. Give the webhook a Name and add a brief Description. Check two Event Types: Commented and Deleted.

  8. Scroll down to the Endpoint Configuration section. For the Endpoint URL, enter the URL in the following pattern:

    Copy

    Endpoint URL

    https://{instanceURL}/admin/contentSources/subscriptions/box/{csid}/{tenantHash}
    • Get the {csid}and {tenantHash} from the SearchUnify team.

    • Select REST as Payload format.

  9. Scroll further down to the Callback Parameters section and click add callback parameter. Add the following three callback parameters:

    Method Parameter name Parameter value
    GET itemId item_id
    GET itemType item_type
    GET webhookEvent event_type

  10. Click Save Webhook.

Last updatedTuesday, February 6, 2024

Or, send us your review at help-feedback@searchunify.com