<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Mapping a rest API response in Build Apps in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/13688792#M4828027</link>
    <description>&lt;P&gt;Thanks Marc,&amp;nbsp;&lt;/P&gt;&lt;P&gt;it works for me and i can bind it correctly&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 03:24:22 GMT</pubDate>
    <dc:creator>Ben_Samuel</dc:creator>
    <dc:date>2024-05-02T03:24:22Z</dc:date>
    <item>
      <title>Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaq-p/12772078</link>
      <description>&lt;P&gt;I am consuming a REST API in Build App and need to map few fields from &lt;STRONG&gt;data&lt;/STRONG&gt; collection and as well as msgs.count from &lt;STRONG&gt;collections&lt;/STRONG&gt; collection as shown in below images.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195584-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195585-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I have added below code in Response mapper to map fields from the &lt;STRONG&gt;data&lt;/STRONG&gt; collection and created an entity. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195586-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;{ records: response.data.data , driverCode: response.status }&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Is it possible to map the msgs.count from &lt;STRONG&gt;collections &lt;/STRONG&gt;collection as well in the same entity along with other fields from data collection from the rest API?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 02:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaq-p/12772078</guid>
      <dc:creator>souvikroy</dc:creator>
      <dc:date>2023-08-01T02:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772079#M4794824</link>
      <description>&lt;P&gt;the JSON you show all comes from same response, I assume?&lt;/P&gt;&lt;P&gt;can you show what you want to end up with?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 05:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772079#M4794824</guid>
      <dc:creator>Dan_Wroblewski</dc:creator>
      <dc:date>2023-08-01T05:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772080#M4794825</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Yes,it comes from same API call json response.&lt;/P&gt;&lt;P&gt;I need to display a  list report with the below columns. I also added their mapping.&lt;/P&gt;&lt;P&gt;I will be using Row component and would like to repeat the data rows on the data variable for display.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195590-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 05:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772080#M4794825</guid>
      <dc:creator>souvikroy</dc:creator>
      <dc:date>2023-08-01T05:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772081#M4794826</link>
      <description>&lt;P&gt;With &lt;STRONG&gt;{ records: response.data.data , driverCode: response.status } &lt;/STRONG&gt;you are filtering the results for the data entity of your api call. Just remove the response mapper. Afterwards you will have access to also to the collections entity.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 06:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772081#M4794826</guid>
      <dc:creator>MarcHuber</dc:creator>
      <dc:date>2023-08-01T06:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772082#M4794827</link>
      <description>&lt;P&gt;I am assuming this question is related to the other question you entered.&lt;/P&gt;&lt;P&gt;So you could:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do the data manipulation here, in the data resource.&lt;/LI&gt;&lt;LI&gt;Do the the data manipulation in a set data variable flow function to reset the data variable.&lt;/LI&gt;&lt;LI&gt;Do the data manipulation before the binding.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It depends which data you will need and when.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 07:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772082#M4794827</guid>
      <dc:creator>Dan_Wroblewski</dc:creator>
      <dc:date>2023-08-01T07:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772083#M4794828</link>
      <description>&lt;P&gt;Hi Marc, Thanks for your reply. The reason I added the response mapper, so that I can bind the response with the list report correctly otherwise, I will not be able to bind the response to a data variable to repeat it as list.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 15:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772083#M4794828</guid>
      <dc:creator>souvikroy</dc:creator>
      <dc:date>2023-08-01T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772084#M4794829</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;daniel.wroblewski&lt;/SPAN&gt; I was able to manipulate in a set variable flow function . Can you please guide me, how we can map/manipulate in the data resource itself. &lt;/P&gt;&lt;P&gt;Note: The API is a standard API and I will not be able to manipulate the response layout of the API.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 15:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772084#M4794829</guid>
      <dc:creator>souvikroy</dc:creator>
      <dc:date>2023-08-01T15:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772085#M4794830</link>
      <description>&lt;P&gt;To manipulate in the data resource, you would take your formula you used (and Marc rightly said was unnecessary above) but now use it and add functions to manipulate the data, now that you want to manipulate here.&lt;/P&gt;&lt;P&gt;Just as an example, I took Northwind and set the retrieve to return the first record.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195640-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Then I added this to the response mapper ...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{ records: PICK_KEYS(response.data,["CustomerID", "City"]), driverCode: response.status }&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;... so that it returned the same record but with fewer fields.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2195638-image.png" /&gt;&lt;/P&gt;&lt;P&gt;You can do whatever you need in the formula.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 16:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772085#M4794830</guid>
      <dc:creator>Dan_Wroblewski</dc:creator>
      <dc:date>2023-08-01T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772086#M4794831</link>
      <description>&lt;P&gt;Hi Souvik,&lt;/P&gt;&lt;P&gt;Please see my response in this one. Hope this will work for you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/answers/13938600/view.html"&gt;https://answers.sap.com/answers/13938600/view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 16:51:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/12772086#M4794831</guid>
      <dc:creator>vikas_992001</dc:creator>
      <dc:date>2023-08-01T16:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping a rest API response in Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/13688792#M4828027</link>
      <description>&lt;P&gt;Thanks Marc,&amp;nbsp;&lt;/P&gt;&lt;P&gt;it works for me and i can bind it correctly&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 03:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mapping-a-rest-api-response-in-build-apps/qaa-p/13688792#M4828027</guid>
      <dc:creator>Ben_Samuel</dc:creator>
      <dc:date>2024-05-02T03:24:22Z</dc:date>
    </item>
  </channel>
</rss>

