In this exercise, you learn how to find and test the APIs in the SAP API Business Hub. We will view the available APIs for SAP S/4HANA Cloud, which can be consumed to build a side-by-side scenario.
Information for execution
After every step description, you can choose the [play] link to open a recorded simulation of the described actions.
In Google Chrome, access the SAP API Business Hub and log on. [play]
In Google Chrome, open https://api.sap.com.
If you already have an account (such as, your SAP Business Technology Platform account), choose Login, enter you user and password. Accept the conditions in the Legal Disclaimers.
If you don't have an account yet, choose Register and create one.
Display the APIs for SAP S/4HANA Cloud. Search and display the API page for the business partner. [play]
Search for business partner.
Scroll down to the Business Partner (A2X) section. Choose the first api within this section, with description Perform CRUD (create, read, update, delete) operations on Business Partner, Supplier, and Customer master data in SAP S/4HANA Cloud system.
Review the content of the Overview tab.
Search and test the Business Partner API. Execute a GET retrieving the information of the first two business partners. [play]
Switch to the Try Out tab.
Go through the list of the APIs on the left side and choose Business Partner, then choose GET /A_BusinessPartner
In the parameters, in the $top parameter, enter 2.
Review the Response body.
If not already available, install and run the Advanced REST Client app, from the Web location https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US extension (you can find the link in the
test_api_arc_install.txtfile [download] ).
In Google Chrome, open the Customize and control menu using the button in the top right corner of the browser. Choose More tools → Extensions. If the Advanced REST Client is already installed, just close the browser tab and proceed to the next exercise step.
If the Advanced REST Client is NOT already installed, open the link just indicated in the step description.
In the Advanced REST Client page, choose Add to Chrome. In the following pop-up window, choose Add app. Wait until the app is installed. A window containing all of the Google Chrome apps appears.
Open the Windows Start menu, then search and open the Advanced REST client application.
In ARC, skip the introductory window.
In the Advanced REST Client, test the A_BusinessPartner API again. Execute a GET retrieving the information of the first two business partners. [play]
In Google Chrome, access the documentation page for the Business Partner (A2X).
In the header of the page, choose Show API Key.NoteNote the API Key for future use in this exercise. The API Key is an identifier that replaces your user and password when you access the APIs in the SAP API Business Hub.
In the Overview tab, navigate to API Resources → Configuration Details and note the Sandbox URL (
Switch to the API Reference tab, in the list on the left, choose Business Partner → GET /A_BusinessPartner.NoteNote the path suffix beside the first GET (
Observe the meaning of the first parameter named $top.
In Google Chrome, choose Apps (in the top left corner), then open the ARC (Advanced REST Client) application.
In the Method, enter Get.
In the Request URL, enter the Sandbox URL followed by the path suffix (
Choose Open detailed editor (the small down arrow on the right of the Request URL).
In the Param name field, enter $top.
In the Param value field, enter 2.
Scroll down the page, and in the Header name field, enter apikey.
In the Header value, enter the API key you previously noted.
Scroll up and choose the SEND button.
ResultThe API was called and executed.
Scroll down to see the return code (200 for success) and the returned XML information, including the two retrieved business partners.