Building & Consuming API’s using SAP API Management (Part 2)
In the previous article Building & Consuming API’s using SAP API Management (Part 1), I showed how easy it is to create API’s and publish them using the API Portal. Now we are going change personas and login to API Management as a Developer.
SECTION 3: DISCOVER API’S TO CONSUME
Developer portal is an application that provides a common platform for Application developers to consume APIs. Every SAP API Management customer is provided with their own Developer portal application on cloud. The Developer portal offers capabilities to onboard application developers, explore and test APIs, create and subscribe to Applications
3.1 Accessing DEV Portal
Navigate to the API Management main menu and launch the DEV Portal
Notice that our new product is already made available in the DEV Portal.
Open the Product and explore the API along with the documentation. Notice that everything generated in the API Portal is automatically translated to the Dev Portal. You can see the operations against each resource including the documentation which was added for each of the resource.
From the Product page, click on Subscribe > New Application
Provide the name for the Application and click on Save button
3.2 Consuming the Application
Navigate to the Consume section to see the App you recently created.
Open the App to locate the Application Key and make a note of this key.
3.3 Testing the API
Navigate to the Test section of the Dev Portal.
• Select the GWDEMO API
• For Authentication, provide Basic authentication with your user/password
• Select the collection as SalesOrderCollection
• Under Header, provide a new variable apikey and paste the application key you copied earlier.
• Test the service by clicking on Send button.
If you didn’t not provide an API Key, you will be given an error message as shown.
Now with your fully configured OData API Proxy, with control policies, and API Key, the API is ready to have an App developed on it!
SECTION 4: Troubleshooting Tips
When creating an API in the API Portal, I was confronted with this error message. It didn’t allow me to Save an API
Similarly when I tried to subscribe to a Product in the Dev Portal, it gave me the below error message.
It turned out that all these errors were due to incorrect role assignments. If you bump into these issues, ensure that additional access is not given to your user account as well as the service user p1940842373.Sounds strange, but it worked for me.
I hope you found this informative.