REST API doesn't fetch data
Question

Hi,

I have created a rest API and when I test the API using a sample input, it works. But when I fetch the response in the application, I get null values. Please advise why this happens. 

mvp_badge
MVP

Hi Abira,

Please help to share some more details or the sample oml if possible so that we can see what is the actual issue.

Hi Abira,

Please check what input you are passing to Rest API and What is the outcome while you debug the action.

 If possible share your OML file.

Regards,

Komal

Champion

Hi Abira,

In my case, i need to switch to use https in my rest API url definition. I think http REST api is blocked by the browser

Hope it helps

Hi Abira.

Debug the app and check the response that came from the API with more detail.

Regards

Gonçalo Almeida


Hi Abira,

To better trace the problem turn on the 'Full log' option in service center (Applications -> Modules -> ModuleName -> API Tab).

After that option is active, do another call from the screen and after go to the service center log (Monitoring -> Integrations), search the integration and download the full request and response from the service call.

With that, you can check if the problem is in the input sent when using the screen sending the wrong input (my suspicion) or if there's something wrong in the service.

Hope it helps,

Ricardo Pisco.

Hi all,


Unfortunately, I cannot share the OML. Attached the screenshot. When I check the service center-integration tab, I don't find the REST API listed. Please advise. 



12.jpg

Champion

Hi Abira,


You have add the API in the outsystems and already 1 click publish right ?

You can check on service center like Ricardo said, the API should be there if you already 1 click publish after adding the API in the outsystems.

Champion

Hi Abira,

can try to check your REST API effective URL? 

It may be overwritten to point some other rest api URL. For production, normally administrator will change the actual production REST api url from the service center instead of changing at service studio.

You can go to your service center > modules > look for your app > Integrations tab > consumed rest api.


Hope it helps


Abira

I saw your screenshot and my concern is about the user and password that is sent in the structure.

I think we can have a security issue here.

Did you try to test the endpoint using for example the postman app?

Regards

Gonçalo Almeida



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.