Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ivanvasev
Advisor
Advisor

Introduction


The steps described below, would show how to access the SAP Task Center APIs using Postman. For more information on the SAP Task Center, you could visit: What is SAP Task Center and for more information on the available SAP Task Center APIs, you could visit: SAP Task Center API.

 

1. Determine Service Instance Parameters





    • Navigate to the Cloud Foundry subaccount, where your SAP Task Center instance was created, select Instances and Subscriptions in the navigation area, and go to Instances.

    • Choose the row of the SAP Task Center service to see the details of this instance.

    • In the Service Keys section choose the available service key, or create one, if no service instance is available.









    • In the Credentials pop-up, open the JSON format, find and note down the following parameters: 

      • endpoints -> inbox_rest_url

      • uaa -> clientid

      • uaa -> clientsecret

      • uaa -> url








2. Assign permissions to your IAS user for accessing the SAP Task Center API


To run the Connector Status API and/or Data Export API, the following steps should be followed:

  • Navigate to the Cloud Foundry subaccount, where your SAP Task Center instance was created, select Security -> Role Collections in the navigation area.

  • If you have run the Booster for SAP Task Center (for more information see: Boosters), you should see two Role Collections:

    • TaskCenterAdmin, having Role TaskCenterAdmin - if you want to access the Connector Status API, open this Role Collection and add your IAS user to it

    • TaskCenterTenantOperator, having Role TaskCenterTenantOperator - if you want to access the Data Export API, open this Role Collection and add your IAS user to it



  • Note: if you haven't run the SAP Task Center booster, you should manually create the Role Collections, add the respective roles and add the user to them as required. Another option would be to run the Booster for initial setup.



3. Setup authentication in Postman



  • In Postman, open a new tab and navigate to Authorization tab

  • Setup the following settings (see picture below)

    • Type: OAuth 2.0

    • Grant Type: Authorization Code

    • Callback URL: http://localhost

    • Auth URL: enter the uaa->url from step 1 and add /oauth/authorize at the end

    • Access Token URL: enter the uaa->url from step 1 and add /oauth/token at the end

    • Client ID: enter the value of uaa->clientId from step 1

    • Client Secret: enter the value of uaa->clientsecret from step 1



  • Select the Get New Access Token button





  • In the newly opened IAS logon screen, enter your IAS user's credentials (use the IAS user with respective permissions from step 2)





  • Choose Proceed





  • (Optional step - useful for troubleshooting missing permissions) When the token is visualized, scroll down to validate if the user has the required scope(s)

    • STATUS_MONITORING - required for access to the Connector Status API

    • DATA_EXPORT - required for access to the Data Export API







  • Choose Use Token





4. Call the SAP Task Center API


To see the available SAP Task Center APIs, you could visit: SAP Task Center API

Example: If you would like to check the connector statuses of your configured destinations, you could take the endpoint:

/task-center-service/v1/connectors

and append it to the retrieved in step 1 value of:

endpoints->inbox_rest_url

For example if you have

endpoints->inbox_rest_url = https://api.one-inbox-service-sap.cfapps.eu10.hana.ondemand.com/task-center-service

you should build and enter the following URL in Postman:

https://api.one-inbox-service-sap.cfapps.eu10.hana.ondemand.com/task-center-service/v1/connectors

Once you have built the URL and authenticated by following the steps above, you could run the query. As a result, you should be able to see the list of configured connectors and their statuses.




Conclusion


Following the steps described above could guide you in running the connector status API for listing the configured destination connectors as an example. However following those steps could also be used to run any SAP Task Center APIs.

For more information on the SAP Task Center, its availability and the exposed APIs, you could visit:

Hopefully this blog was helpful for you and we would strive to further improve it based on your feedback.
1 Comment