Hi,I'm using google vision API for image detection . In content I'm passing the Base64 format of binary image, it works fine when I'm testing it in outsystems rest API consume but whenever I'm using it throw's NOT_FOUND error. Can anyone help in this please. I'm following this links instructions, but I don't understand the third step how to use and why it is necessary.
Thanks,Rakhi
Just noticing something. In the URL path is images:annotate included.
OutSystems does an URL encoding of the path before it consumes the REST API. This leads to to the following string images%3Aannotate. That is why you get the 404 NOT found error.
Now comes the tricky part as there is not default to prevent URL encoding and for some reason there is no built-in function to decode a string. I attached a XIF from our own factory. This includes a single action UrlDecode which takes a string as input and generates a decoded output. You have to open it with Integration Studio and publish it to your factory.
In your Service integration add an OnBeforeRequest handler.
As first action add the UrlDecode from the extension. Set the input to Request.URLPath
After the default Assign add another assign and
set Customized.URLPath to UrlDecode.Decoded.
That should do it.
Stefan
It works now. Thankyou so much @Stefan Weber .
Hi Rakhi,
Try to find out more details from Integration Logs in Service Center.
Dig deeper into integration logs by downloading HTTP Trace of those error logs (this would be only available if you raise the Logging level from your integration module (that has REST API).
With proper logs you will reach upto being able to access the HTTP Trace of the request.
If that trace doesn't provide enough information, try sending request using Postman and see if it works with the values you're passing to the API.
Kindly share integration logs and http traces for further checks. Let me know how it progresses.