SAP Cloud ALM Extend with APIs (Part3): Work with SAP Cloud ALM API in the SAP API HUB
Let’s see how to interact with the different APIs of SAP Cloud ALM in the SAP API HUB.
Get the URL Tokens
As already seen in the previous blog, service instances are created in SAP BTP to alloow external applications to consume services from SAP Cloud ALM.
Service instances are created from customer’s sub-accounts in the SAP BTP cockpit with the following information:
- Service name,
- Service plan,
- Authorisations (list of scopes).
The corresponding service keys generate OAuth 2.0 credentials for consumers of the services Instances.
The Service keys contains 3 parts:
- clientID: public identifier for the service instances
- clientSecret: known only to the BTP service broker and the authorisation server.
- tokenURL: give users access permission for SAP Cloud ALM
Create the API environment
From the SAP API HUB navigate to a SAP Cloud ALM API (for example: Project API).
Click on the “configure” button to add your own environment.
Enter the following information:
- Display Name (ex: SAP Cloud ALM my Dev Tenant)
- Client ID
- Identity Zone
Save the API environment.
Try out the API environment
The new API environment can be used from the SAP API HUB with the “try out” functionality.
In the next blog, we will discuss how to work the SAP Cloud ALM Analytics API REST endpoints.
Thanks for reading.
thanks for your blog article.
I followed your instructions to create a SAP CALM API Instance and a service key. Now I can use the client id and the client secret to receive a oAuth Token (Its working in Postman).
But if i try to call any API from the API Hub i get an 403 Forbidden error (The error is shown in the API Hub and Postman).
(For the service key i inserted the same json as shown in part 2. Further I created an onther key without filling the json input field. Both keys cause the same error)
My inputs are the following:
I hope you have a hint for me to get the API working.
can you try with the following scopes:
thanks for your reply and your blog update.
The CALM API key is now working with the new scopes.