Skip to Content
Technical Articles

SuperQuick way to consume API’s from SAP API Business Hub via Postman

Background

The trigger for this blog has its background in our super cool #HandsOnSAPDev session by DJ Adams on last Wednesday. In the session DJ was showing us how to consume SAP API Business Hub workflow API’s over curl. It occurred to me why do I have go to the SAP API business hub to actually try out these API’s why can’t I do something in our good and reliable Postman. I can definitely go and manually create an API call in postman but that is too cumbersome and irritating.¬† In this world of openAPI why can not we have some simple solution. So this blogs talks about discovering such simple solutions

Lets Explore.

I causally opened my postman app and started exploring around, looking for a way to make this possible. The first thing which caught my eyes was this new tab API’s with beta. I thought of exploring it.

On clicking create API it opened a tab where you can define your API specification wow:). I was like amazed not only define you can develop, test and observe also. We will explore other things in coming blogs.

What I see is an option to import you API specification via file.

I thought if somehow SAP API Business Hub can export those specifications then I can import here and my work is done right?. I vaguely remember seeing in somewhere  so I went to API business hub under details tab and there we have it, BINGO

All I did was download the JSON specification and import it here

Click on beautifier and wrap string to make it readable.

We are using OpenAPI3.0 version so we need to the version details

"openapi": "3.0",
"swagger": "2.0",
"info": {
         "version": "v1",
          "title": "***"
}

Click on Save and then Generate Collection

Under Collection you can see we have all different endpoints available.

Lets try one of them, as can be seen below baseUrl is environment variable.

Lets create this variable and assign the endpoint root url. Please watch the session video of how to set the configuration and get the url.

We are ready, good to test out things. Please make sure under authorization tab you are providing the basic authorization. BINGO we have our all workflow definitions available.

So What is next?

So now you can see how easy it is to set up your Postman once and for all. One can download the specifications as per his/her own need use it. I believe we have just scratched the surface of this new API tab in postman, we will explore how to create custom API, test and monitor in coming blogs. Feel free to provide your feedback.

2 Comments
You must be Logged on to comment or reply to a post.