Connect Your SAP Build Application to a Public API
Connect your application to a public API and then test that it's pulling the right information.
Overview
You will learn
- How to add and configure data resources
- How to test data resources
Prerequisites
Steps
Open your app to the Integrations tab.

Add data source Under SAP Build Apps classic data entities, click Create Data Entity.
Select Universal REST API integration.

Rest API direct integration Configure the resource with the following details:
Field Value Data entity name OpenFoodFacts Base API URL https://world.openfoodfacts.net/api/v0 Data entity description Data from Open Food Facts API 
Enter data resource information Scroll down to the Additional Inputs section, and click Add New to add a placeholder for a parameter in the URL.

Additional inputs The API enables us to send a barcode as part of the URL, and then returns information about the food with that barcode.
In the dialog, add a field called barcode of type text.
IMPORTANT: Make sure you do not add an extra space to the end of barcode.
Click Add.

Additional inputs If you scroll down you will see the additional input.

Additional inputs result
You now need to configure which information is taken from the Open Food Facts API. This can be achieved using a Retrieve request.
Click on Retrieve and enable the request by turning on the toggle switch.

Enable retrieve In the Relative path and query field enter, click on the X.

Start binding for path Select Formula.

Formula Click Create formula.

Create formula Enter the following formula:
JavaScript"/product/" + query.additionalInputs.barcode + "?fields=product_name,nutriments,image_front_url"The API contains 100s of fields. We added a filter to make it easier to work with in the project.
Click Save twice.
You will now test to see if the resource is configured properly.
Go to the Test tab.

Test configuration In the barcode additional inputs, enter the following:
JavaScript6416453061361Click Run Test.

Run test Scroll down a little to see the response.
In this response, you can see just the information we need: product name, nutritional information, and an image.

View the results
After a successful test you should now set the data schema. This stores the data structure from the URL, enabling the application to easily identify the types of information it is fetching.
In the same window where you did the test, scroll back up and click Autodetect Schema from Response.

Set schema If you click back to the Base tab, you will see the response schema now set.

Set schema Click Save Data Entity (bottom right).
Click Save (upper right).
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.