Google Cloud Vision API using REST

Good Morning Fellow Outsytems Users,

Has anybody had any success in using Google's Cloud Vision API using the built-in REST features of the platform?

I know there is the GoogleCloudVisionOCR Forge component to do this, and it does work well, but I would like some more flexibility without having to write code.

I've set up the REST component using an example POST request/response message that tests perfectly and then builds the structures required.

I'm happy that my module is putting the correct data in the correct places before sending it, but when I try and use the routine I get a "404 - Not Found" error message being returned every time, which is what I find confusing. If I was getting a "Bad Request" or "Server Error" then I'd suspect I was building the message incorrectly and look to fix it, but a 404??

Here's hoping,



Good news! Posting this just in case anyone else ever gets this issue.

I've manage to solve this by going away and reading all the available material on the Outsystems site for debugging and troubleshooting. Enabling full logging and using the http request detail gave me the clue.

I could then see that the platform was replacing the colon : in the URL with a %3A causing the 404 error from Google.

By adding an OnBeforeRequest action to the REST integration and doing the replace below fixed it.

SyntaxEditor Code Snippet