Configure Webhook listeners 编辑

Configure webhook listeners (also known as HTTP push API) to enable your microapps to provide near real-time data to your end users. Configuring a webhook allows your apps to deliver data to other applications at a much quicker rate than synchronization from the Microapp platform side. The maximum size of a webhook request body that can be handled by MA server is 64 kb.

Adding webhook listeners requires you to be familiar with your target application System of Record and have the necessary tools and administration privileges set up to configure your webhooks in those locations.

Configure your webhooks after you have set up your integration via Data Loading and follow these steps:

  1. Click Webhook Listeners on the left hand bar of the HTTP Integration screen:

    Webhook listeners

  2. Enter your desired webhook name.
  3. Select Copy to copy the webhook URL for use in your target System of Record administration interface.

Authorization method

You can select either the Token authorization method or None when configuring your authorization method. To configure the token method follow these steps:

  1. Select Token in the Authorization method menu.
  2. Select Generate token and then select Copy to add the token to your clipboard for use in your target System of Record administration interface.
  3. Select read token from to choose from:

    • Custom header
    • Query parameter
    • Authorization header
  4. Define either the Name or the Prefix depending on your selected read method.

The token is now set up.

Request methods

When configuring your Webhook listeners, use the following definitions to build your calls:

  • PUT is used to update existing resource.
  • POST creates new subordinate resources, therefore, POST methods are used to create a new resource in the collection of resources. Both PUT and POST deletes data from child tables using the primary key info from of root table. It then replaces an existing record or inserts a new one.
  • DELETE is used to delete resources. DELETE has two endpoints:
    • {serviceUuid}/{webhookListenerUuid}/{recordId} where recordId is the value of the primary key of the record in the root table to be deleted. Records in the child table are deleted accordingly.
    • {serviceUuid}/{webhookListenerUuid}/?id1=1&id2=1 where id1 and id2 represent the values of the composite primary key of the record in the root table to be deleted. Records in the child table are deleted accordingly.
  • PATCH requests are used to make partial updates on a resource.

Define data structure

You can define your data structure in a similar method described when you Fetch data structure during Data Loading configuration. For more information see Configure the integration.

To define your webhook data structure follow these steps:

  1. Set your desired data retention period. All entries that are older than this date are deleted. Each saved entry contains its date and time of modification. That is lastModified. This date and time is used to decide which entries to delete.
  2. Select Generate Tables.

    The Generate Tables screen opens.

    Paste your JSON sample request from your target application System of Record here.

  3. Set your base name of created tables.
  4. (Optional) set the root path if necessary.
  5. Select Generate.

With this process complete alongside the configuration measures completed in your target application System of Record administration, select Add.

Your webhook is now configured.

Scripting support

Webhook listeners support custom scripts configured in the HTTP integration scripting feature.

You can find additional information on developing and implementing your own scripts at the Citrix Developer Portal.

Show Webhook logs

Use Webhook logs to view a history of requests and errors from all webhook endpoints. You can filter by webhook name and state, such as success, error, or all. For the purposes of performance, only the last 10 webhook log entries are kept for review in the webhook logs screen.

  1. From the Manage Microapps page, select the menu next to the integration that you want to view integration logs for.
  2. Select Webhook logs.
  3. Review the entries, and select from the menu to filter as required.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:79 次

字数:6386

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文