Sending a response in REST

Hi all,    I have been looking through the forum and docs, but I can’t seem to work out how to send a custom response in a published rest service.    In the GET operation we require the caller of the API to specify an offset and amount and I am adding logic to the GET microflow which will check if the amount is more than 10,000. If its I would like to send response 413, payload too large.   I have initially tried to create a httpResponse in the GET mircoflow, however the microflow already has the return value as the list of objects. I wondered if I needed to specify the header and response as parameters, but when I try this I get this issue. I beleive header/response need to be a string but getting a bit lost.     Cold someone point me in the right direction please
1 answers

Hi Garion, 


Please have a look at this documentation about publishing REST services. In your microflow you should create an httpResponse object and return it, so the caller of your REST service gets the correct response.


Hope this helps.