Adding and Managing a Header

Define one or more headers to pass to the header section of the REST request. A header has a key and a value. All standard REST API request headers are supported.

For example, you can add the Content-Type header for a POST or PUT request.

The following procedures can be used to add and manage headers in the main HTTP URL or the optional polling URL and termination URL.

Creating a Header

Create a request header for the main HTTP method or the optional polling and termination HTTP methods.

To create a header:

  1. On the Define execution details step of the Configure REST API Details page, select Header to create a header for the REST task.

    To create a header for the polling or termination URL, go to the Specify completion criteria page, select the Configure a polling and termination condition for a no-wait REST call checkbox. On the Polling or Termination tab, select Header.

  2. Click Add header.
  3. In the Key field, start typing the name of a header.
    When a matching key is found, a list of suggestions displays in a menu. Select the header you want.
  4. In the Value field, start typing the name of the header value.
    When a matching value is found, a list of suggestions displays in a menu. Select the header value you want.
  5. Click Add.

    The header key and value is added to the Header table.

    To assign a parameter for the value of the header key-value pair, click Expose as a task parameter. See Parameterizing a Header Value.

Editing a Header

You can edit the key and value of a header.

If the header value is parameterized, edit the parameter to change the default parameter value. See Editing the Value of a Parameterized Header.

To edit a header key-value pair:

  1. On the Define execution details step of the Configure REST API Details page, select Header to edit a header in the REST task.

    To edit a header for the polling or termination URL, go to the Specify completion criteria page. On the Polling or Termination tab, select Header.

  2. In the table row for a header, select Edit from the Actions menu (Actions menu).
  3. In the Edit header panel, change the values in the Key and Value fields, and click Save.

    As you start typing in either field, a list of suggestions displays in a menu when a matching item is found. You can then select the header key or header value you want.

    Note

    If the value in the Value field is a parameter string such as ${PARAMETER_HEADER}, and you overwrite the string with a header value that matches the key, the parameter is removed when you click Save. To parameterize the header value again, click Expose as a task parameter, as described in Parameterizing a Header Value.

Deleting a Header

Deleting a header removes the header key-value pair from the REST task.

To delete a header:

  1. On the Define execution details step of the Configure REST API Details page, select Header to delete a header in the REST task.

    To delete a header for the polling or termination URL, go to the Specify completion criteria page. On the Polling or Termination tab, select Header.

  2. In the table row for a header, select Delete from the Actions menu (Actions menu).
  3. In the Delete header dialog box, click Delete.

    The header key-value pair is removed from the Header table.

    Note

    If the header value was parameterized, the parameter that was associated with the header value is not deleted. To delete the parameter, see Deleting a REST Task Parameter.
Parameterizing a Header Value

After defining the key-value pair for a header, you can assign a task parameter to the header value.

To parameterize the header value of a header:

  1. On the Define execution details step of the Configure REST API Details page, select Header.

    To parameterize a header value for the polling or termination URL, go to the Specify completion criteria page. On the Polling or Termination tab, select Header.

  2. In the table row for a header, next to the header value, click Expose as task parameter.
  3. In the Add parameter panel, enter a name for the parameter in the Identifier field, or use the default value.

    The parameter name must be unique in the REST task. For a current list of the parameters in the task, see Viewing All the Parameters in a REST Task.

  4. (Optional) Enter a Description to help identify the purpose of the parameter to other users.
  5. The Data type is String. You cannot change the data type.
  6. Set the Length.
  7. Set the Default value for the parameter.
    The default header value is used at runtime, unless you change the value at design time or runtime.
  8. Click Add.
    The table row of the header is updated with the parameter name next to the header value.
Editing the Value of a Parameterized Header

You can change the default value of the parameter only.

To edit the default value for a parameterized header value:

  1. On the Define execution details step of the Configure REST API Details page, select Header.

    To edit a parameterized header value for the polling or termination URL, go to the Specify completion criteria page. On the Polling or Termination tab, select Header.

  2. In the table row for the header value that you want to change, next to the parameter name, click Edit parameter.
  3. In the Edit parameter panel, change the parameter value.
  4. Click Save.
Removing a Header Value Parameter

Removing a header value parameter removes only the association of the parameter to the header value of the header.

Removing the header value parameter does not delete the header key-value pair.

To remove a header value parameter:

  1. On the Define execution details step of the Configure REST API Details page, select Header.

    To remove a header value parameter for the polling or termination URL, go to the Specify completion criteria page. On the Polling or Termination tab, select Header.

  2. In the table row for the header value parameter that you want to remove, click Remove parameter.
  3. In the Remove parameter dialog, click Remove.

    The parameter is unassigned from the header value of the header. The value that was assigned to the parameter becomes the header value.

    Note

    The header value parameter is not deleted from the REST task. To delete the parameter, see Deleting a REST Task Parameter.