HTTP integration scripting 编辑

HTTP integration scripting allows you to programmatically script some of your HTTP integration features:

  • Data loading - your script can define one or more synchronization functions that fetch data from a System of Record (SoR), transform it and store it in the cache.

  • Service actions - your script can define one or more functions that write data to the SoR, fetch information about a created or updated record and store it in the cache.

  • Webhooks - your script can define one or more functions that react to data configured and pushed by your application system of record.

Each script defines multiple synchronizations and action functions. HTTP integration then invokes these functions during synchronization execution or when your microapp user invokes an action.

Additional detailed developer resources regarding microapp scripting can be found at the Citrix Developer Portal.

Before you begin

Using the scripting functionality infers that you are familiar with your target application SoR. Use scripting when all other integration methods have been exhausted in configuring your integration.

When using scripting for HTTP integrations you must follow this general process:

  • Ready your script that you want to import via the Microapp administration interface.
  • Scripts must be written in the javascript language edited in your preferred text editor / development tool.
  • When ready, import the script via the integrations tab in the Microapps admin interface or optionally you can enter your script directly into the text editor provided in the scripting feature.
  • When imported, test the script.

Import a script

To import your prepared script via the integrations tab in the Microapps admin interface. Follow these steps:

  1. Select Scripting.

    Scripting

  2. Select Upload script. Alternatively, you can input your script directly into the text area by selecting Edit.

    Import script

    A blade opens.

  3. Drag your script onto the import pop-up.
  4. The script is parsed and validated.

    Import script success

  5. Select import.
  6. Your script is imported.

Note:

You can now edit the script directly in the Scripting text editor or update the script by importing the script file again.

  • You can view the scripted synchronization as data endpoints in the Data loading, Service actions, and Webhook screens.
  • You can view the table defined by the script in the tables page.

    Script table

  • You can view the script output in the log.
  • You can see the requests made by the script in the sync log.

To view and monitor your script as it runs go to the logs screen.

FAQ

Authentication - Scripting uses the same client as configured for your System of Record (SoR) integration therefore matches all the same authentication defined in your HTTP integration.

All configuration settings as configured in Data loading and Service actions for your target SoR are propagated into the scripts.

Scripts, once loaded, are included in microapps import / export (so can be imported exported to the bundle repository).

Custom Integration Parameters

Scripting also supports custom integration parameters for when configuring your HTTP integrations. For example, your integration uses specific application IDs to reference a specific application in a user workspace. This ID is specific to the user and must be set for each integration.

Custom parameter or secrets are defined by Configuration Parameter definition, consisting of:

  • name (String, no spaces, no special characters)
  • label (String)
  • description (String)
  • type (String, same as column type)
  • default value (populated during import)
  • required (boolean)
  • secret (boolean) (secrets are never recorded in the Microapps cache or logs).

Other resources

Learn about developing scripts at Citrix Developer Portal.

Get started with developing your own scripts at Getting started with Microapps scripting.

See examples of Microapps scripts at Microapps script SDK.

Get the latest SDK release at Microapps script SDK releases.

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

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

发布评论

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

词条统计

浏览:15 次

字数:6465

最后编辑:7年前

编辑次数:0 次

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