API Return 404 When Called with URL Parameter

Hello, I need to consume an API to get employee data with GET Method. The API required 1 URL Input Parameter and 3 Headers Input Parameter. I tried to test it in the Consume REST API Method and it worked, but when I call it using server action it returns exception 404.

I tried remove the URL Parameter and replace it with a hardcoded string, both in Test and called in server action works fine.

I'm curious why if i put an URL Parameter it returns 404 when being called through a server action but works fine on Test.

Hi Kevin,

404 means not found. Check service center log for the exact path being used by OutSystems. There must be s mismatch.

If you have swagger definition of the rest API, consume it again and check if the method is imported differently as you have right now.

Regards,

Daniel

Adding:

Are you sure you are passing the exact same value from test when using the parameter? 

Did you check in debug? 

Cheers

Solution

Hi,

Apparently, the API given to me already have another URL parameter so I only need to concat the second parameter within the first one. Sorry for the confusion. Thanks!

Solution