Adding an API call to a task
Sponsor Administrators can set up tasks to call REST APIs. When the partner runs an activity with an API dialog, the response from the API is passed to the API server in the sponsor's organization.
You must have the API configured in the API Configuration page
that is accessed from . You must also
have a task in the task flow on the Definitions tab.
The following limitations apply to a JSON response:
- For a JSON response, if there is no root node present, a node that is named ObjectNode is added to the mapping tree as the root node.
- Due to generic XML and JSON limitations, a JSON response must not contain element or attribute names that starts with a number, contain space or special characters such as $, space, <, >, ^, or &. However, if a JSON response contains element or attribute names that starts with a number or contain space, the JSON content is not allowed for mapping.
- The following characters are invalid and must be escaped when passed in a JSON string:
- " - quotation mark
- \ - reverse solidus
- / - solidus
- \b - backspace
- \f - form feed
- \n - new line
- \r - carriage return
- \t - horizontal tab
- 0x15B3 - hexadecimal digits
- For a JSON response of the type array, a node that is named ArrayNode is added to the mapping tree as the root node. There is no index number provided for elements of the array.
- If a JSON array has elements with the same name and one of them is mapped to any component, API request, URL, or entry or exit condition, all the elements are highlighted to show that all are mapped to it. This behavior happens because elements of an array that have the same name have the same XPath.
- If a JSON array has all elements with the same name and one of them is mapped, during runtime the mapping is replaced by the last element of the array, without regard to which element was mapped.