52
Views
6
Comments
Solved
Not able to get the API data on my screen

Can anyone check and tell me why I am not able to get the response using get API in my app. 

I am posting images using post API and call get API after that and set the response of get message in one local variable named value and I display that on my mobile screen but it is not working. Can anyone help me out with this. I am attaching my .oml file below.

SimpleCameraUpdateOne.oml
UserImage.jpg
Alexandre Yip
Solution

Hi Chetna Upadhyay, 

You can add the callback on response action to your  REST Api to get more info. 

Set the debug in this step and you will have more details about the error. 

Check this link to see how to add it 

https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/customize_rest_api_responses/


Hope that it helps you 

2023-04-16 15-25-31
Krishnanand Pathak

Hi @Chetna Upadhyay,

Have you Tested the API with image Id directly as shown below.
Also the response structure looks different Maybe because of Invalid ImageId. But try to Test API directly with valid ImageId.


Hope it will help.

Regards
Krishnanand Pathak

UserImage.jpg
Chetna Upadhyay

Yes, I tested. It work fine but when I tried to print the response message it shows nothing on the UI.

2023-04-16 15-25-31
Krishnanand Pathak

Did you try to debug the API response on TakePictureClick action.

UserImage.jpg
Chetna Upadhyay

Yes I do but still I dont know what happened.

2023-04-16 15-25-31
Krishnanand Pathak

What was the request and response while debugging.

Were both okay?

UserImage.jpg
Alexandre Yip
Solution

Hi Chetna Upadhyay, 

You can add the callback on response action to your  REST Api to get more info. 

Set the debug in this step and you will have more details about the error. 

Check this link to see how to add it 

https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/customize_rest_api_responses/


Hope that it helps you 

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