External API Activity Support

Description description

Environment
Content Standard

Issue/Symptoms
The third-party REST API endpoint accepts the following JSON format to pass the data.

Actual Payload:

{"destination":"https://www.google.com/work/insights/123","domain":"google.com"}

But ACS modifies the JSON format, which is not accepted by the third-party REST API endpoint.

Modified Payload:

{“data”:{"destination":"https://www.google.com/work/insights/123","domain":"google.com"}}

Resolution resolution

There are two factors that influenced the decision to use the format:

  1. The data portion is only added if there is an inbound temp table generated by previous activity, and the rows from that temp table are serialized into a JSON array. Hence the need for a JSON property named data and the serialized data sent as an array using .
  2. The activity allows custom parameters to be sent to the API as well, which are added to the payload using a params property. Note that these are fixed (configured once into the activity during authoring time).

This normalized format allowed us to have a fixed format without any UI support to customize how to format this according to third-party API specs. The intention was to use a translation layer, such as Adobe IO Runtime, AWS Lambda, etc., to do on-the-fly translation of requests/responses as needed.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f