How to handling Rest API
Application Type
Mobile

Hi All,

i have question about handling rest in outsystems ,
1. first is it posible to create data using rest without store it to outsystems database ?
2. second i try to make a button to see the detail data from rest api, but it sending 500 error, please let me know if anyone figure it out to solve this, ( i share my oap/oml )


Best Regards,

Yansen

TemasTicketingSystemApps.oml

mvp_badge
MVP
Solution

Hi Yoshua,

Like I wrote in my previous post, a 500 error just means "the REST method set a HTTP response status code outside the 200 range". To see what code was actually sent, you should consult Service Center. If it's not visible there, you may need to increase the REST API's logging level in Service Center, then try again.

But if it works when testing it in consume API, but not in your app, most likely it's different input that causes it.

mvp_badge
MVP

Hi Yosua,

Are you talking about consuming a REST service or exposing one? In your screen shot, it seems you are exposing a REST service? If so, it looks odd: it has an output, but no input.

"is it posible to create data using rest without store it to outsystems database" - Really not sure what you mean. What data do you want to "create"? Why do you not want to store this data?

"i try to make a button to see the detail data from rest api, but it sending 500 error" - A 500 error is the most generic error you can have, probably triggered by an exception in the REST service, or by explicitly setting a return code other than in the 200 range. If you have created the REST service yourself, debug it, or check Service Center to see whether there's more details.

Hi Mr @Kilian Hekhuis 

Thank you for your response

i try consuming a REST service, correct me if i wrong I'm trying input data using " fetch data from other source".
when i consuming api to showing data its successfuly, but when i try make button to view the detail using same option it is showing " 500 error " do i need to store the data from api first or any other option ?

"is it posible to create data using rest without store it to outsystems database" just ignore this question, my mistake



mvp_badge
MVP
Solution

Hi Yoshua,

Like I wrote in my previous post, a 500 error just means "the REST method set a HTTP response status code outside the 200 range". To see what code was actually sent, you should consult Service Center. If it's not visible there, you may need to increase the REST API's logging level in Service Center, then try again.

But if it works when testing it in consume API, but not in your app, most likely it's different input that causes it.

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