Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

API REST integration (new UI)

ramg
Explorer
0 Kudos
360

Hi. I'm facing a problem when trying to use the new UI in "Universal REST API Integration".

Where do I can put query parameters in a GET Method?

ramg_0-1734717435438.png

 

3 REPLIES 3

Tinashe_Mukombe
Participant
0 Kudos
307

Hi, I too am facing issues and sadly haven't gotten any responses on here. However for your situation I'd like to help as best I can by showing you how I handle this for my workflow

 

Firstly you'd want to set up your Query parameters from within the Base Api menu. You can then refer to these parameters on all menus depending on when you need them.

Screenshot 2024-12-21 at 11.11.46 AM.png

As for the actual binding, I use the query.aditionalInputs Formula or select from the Data query on the left side within the formula input screen. I then add these paramaters within the Relative path and query to the URL using all the conventional syntax of the formula field (plus sign, string & variable notations etc..)Screenshot 2024-12-21 at 11.21.41 AM.png

 

Additionally if you are using Firebase as a Database and your data lies within documents, you might need to specify this through the API response within the response mapper formula input i.e response.data.documents

Screenshot 2024-12-21 at 11.29.59 AM.png

There could also be something I missed or better ways to do a step I explained therefore I'm open to corrections but I hope you find your solution through this response!

While I'm here I would also like to take the chance to ask a question I had previously asked hopefully some passing readers might offer a solution. That being said I'm facing issues configuring a universal REST API Create request to my Firebase database using the POST method specifically with configuring the schema and testing it. I can't seem to add formulas anymore and it seems like the payload is Different compared to the old API REST integration UI. For the exact same Data Entity I configured in an older application with the older UI still available, I get no errors, however with this new UI I get "Invalid" payload

Has anyone managed to get this to work with Firebase or offer any solutions to this?

MfG

Screenshot 2024-12-21 at 11.42.37 AM.png

Edit, Solved: for anyone stumbling across this problem I had, I found a solution- after tinkering about with the new UI. Request body mapper had to be set to query.record so that the API recognizes the body request. regards

Screenshot 2024-12-24 at 7.19.48 PM.png

 

ramg
Explorer
0 Kudos
293

Thank you @Tinashe_Mukombe for your quick answer. 
I'll try that but it shouldn't be the definitive solution.
The older interface was more clear and intuitive. Maybe this new one is in progress...

It's not common to have developers answers here. So we have to wait. This new interface looks like to have potential for example with formulas in endpoints.

mihaly-toth-nc
Participant
0 Kudos
152

Hello there, 

Just wanted to jump also to this topic as the new UI was causing me some headache as well when it came out. I didn't bother too much with it, rather just duplicated some old REST API resources, and could keep on with those. 

But I did find some pretty good use of it in finally being able to implement `PATCH` requests to a Xano backend. 

Some useful thoughts could potentially be: 
1. for simple query parameter setting you can use the `APPEND_URL_PARAMETERS()` formula to easily combine an object or variable into a GET query string. 

2. to ensure that your backend (in our case Xano) can identify the content of a POST/PUT/PATCH request, we found it useful to also wrap the request body into an `ENCODE_JSON()` formula. 

3. this is something I plan on exploring a little bit more: it seems that this new UI also enables the REST api to be used with Data Components (even including pagination)

I honestly hope that the UI can get slightly better and there can be more documentation about this kind of implementation, but until then this page helped me a lot: 
SAP BTP REST direct integration as it seems that the new universal REST API integration is just an SAP BTP REST integration, without predefined routes. Also I presume that as we can slowly notice other significant UI changes, I presume that the REST api integration also goes into this direction: SAP Build Help centre 


No-code expert with extensive experience in SAP Build Apps (former Appgyver), Firebase, Xano. Actively working on a startup and further projects.