Rest Hooks

In the Composition tab, the Rest Hook option is available within the Integration menu. It is used to make a REST call to an external system.

Procedure

Note: If running behind a proxy server, make sure the proxy environment variables (http_proxy, https_proxy) are set during the installation of Managed services.

  1. Drag Integration > Rest Hook into your flow.

  2. Check Editable if you want to edit these parameters while editing the service instance.

  3. Enter the following values:

    • Title - Enter the name or the title for the Rest Hook.

    • Activity ID - The read-only activity ID is automatically generated.

    • Input URL - Enter the URL where the payload is delivered.

      Tip: The assistive user interface provides suggestions when you type "$". You can select from the interpolation options, such as ${input_parameters, ${datatypes. After you select the interpolation option, enter "." for the user interface to list all input parameters defined before this Rest Hook activity was created.

    • Method - Select the Method. The supported values are GET, POST, PUT, PATCH, and DELETE.

    • Payload - Enter the request body in JSON format. Quotes must be added for parameters with type String or Password. For Counter, List, and Map parameters, you must stringify the JSON data if a parameter value is a linked parameter.

      For example, name is a string parameter and amount is not:

      {
        \“name\”: \“${param.name}\”,
        \“amount\”: "${param.amount}"
      }
      

      Tip: The assistive user interface is available for Payload. It enables you to easily enter multiple interpolations. Type "$" for the assistive user interface to provide you suggestions when you want to add an interpolation.

    • In the Header/Auth section, enter the following values:

      • The Key and Value are displayed for existing header keys and values. Click Edit to add or delete header keys. You cannot edit an existing header.

      • Auth Type - Select the authentication method. basic and token authentication methods are supported.

      • Auth Username - If you select basic authentication, enter the user name to be used for authentication with the Rest Hook authentication management system.

        Tip: The assistive user interface enables you to associate an input parameter with the user name so you can retrieve the user name dynamically during runtime. Type "$" for the assistive user interface to provide you suggestions.

      • Auth Password - If you select basic authentication, enter the password for the user.

      • Bearer token - If you select token authentication, enter a bearer token for the Rest Hook authentication management system.

  4. Open the Destroy tab and enter values to define the Rest Hook that is run when the service instance is terminated. The parameters in the Destroy tab are the same as those in the Create tab.

For supported interpolations, see Input and output parameter mapping for REST Hook.