cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change in "Universal REST API integration" in SAP Build Apps ; "Response key path" is missing

0 Likes
971

Hi Experts,

I have been using the public REST API: https://services.odata.org/v4/northwind/northwind.svc/Orders.

In the new Configuration UI for "Universal REST API Integration," the "Response Key Path" is missing. I tested the API with the below configuration, saved the schema, and mapped it to a data variable for use across UI containers and components (refer to attached screenshots). However, no data appears during the web or mobile test process.

Please assist.

Amitabha_Bandyopadhyay_0-1735724573598.png

 

Amitabha_Bandyopadhyay_0-1735723454295.pngAmitabha_Bandyopadhyay_1-1735723486105.pngAmitabha_Bandyopadhyay_2-1735723534563.pngAmitabha_Bandyopadhyay_3-1735723559534.pngAmitabha_Bandyopadhyay_4-1735723671328.pngAmitabha_Bandyopadhyay_5-1735723794585.pngAmitabha_Bandyopadhyay_6-1735723856206.pngAmitabha_Bandyopadhyay_7-1735723956589.png

Amitabha_Bandyopadhyay_0-1735724867621.png

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Dan_Wroblewski
Developer Advocate
Developer Advocate

If you display the data in your data variable, you will find it empty, which explains why you don't see anything further along. There is a fundamental problem, which is you are executing a list, but you are returning an object (see your first screenshot).

There are 2 ways to do this:

  1. Fix the current way.
  2. Probably use the right data source.

rule.png

To fix the current project using a REST data resource, you need to return a list in your list action. SO you have o get rid of everything else besides your list in the response. To do this, use the response mapper. It already has the basic coding, so you just add "value" to be the top level to be returned in the response.

Dan_Wroblewski_0-1735829242425.png

{records: response.data.value, driverCode: response.status}

 

Now you use he data variable for the repeat, and the bind the fields to "data items in repeat". Not sure what you are doing with the nesting repeats, since there are no nested objects in the response.

But all his begs the question: Why not use the OData data resource for this OData API?

In the past people wanted to send complex OData filters, and this was not possible with the OData data resource, but now you can define actions, which will let you do all that, so I would think that is the way o go.

0 Likes
Hi Dan, I’m new to BTP Build, transitioning from an ABAP background with certifications in BTP IS and SAP ABAP on HANA. Apologies if this seems odd—I’m in a self-learning phase and created a scenario to fetch OData input and display orders in Build Apps. After some trial and error, I managed to make it work. Initially, I struggled with nesting, only extracting the schema with "value" from Northwest Orders OData. Thanks for your guidance and suggestions—they were very helpful! and I truly appreciate.
Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Likes
No worries, and no reason to explain. I'm glad I can help on your journey. Please continue to ask questions -- that is what the community is for. Your post shows SAP has to do a better job of explaining how to use the product.

Answers (0)

Ask a Question