Forum Discussion
It is possible to set the response code for a triggered task. Use a Document to Binary snap as the final snap and set a binary header property called status
, the integer value for that property will be the response code for the API call. For example, the attached pipeline returns a 409 response code
If more fine-grained control is required on the API response, the API management functionality which is a subscription feature allows for full control on the API response.
reds_2020_09_22.slp (3.2 KB)
Is it only the Status code that can be modified? i.e. the body of the message returned to the POSTing system is:
{
“http_status_code”: 200
}
Are you saying there is no way to control this body response?- cjhoward184 years agoEmployee
If you use the document to binary snap method as mentioned above, the $content field in the document being transformed to binary becomes the response body, and the rest of the fields are treated as response headers.
- SpiroTaleski4 years agoValued Contributor
Another approach is by using the Mapper Snap with Binary output. Find the attached sample pipeline:
CustomResponsePipe_2021_12_24.slp (3.8 KB)
Regards,
Spiro Taleski
Related Content
- 2 years ago
- 3 years ago
- 12 months ago
- 4 years ago