[SAP CPI] – WORKING WITH API MANAGEMENT – CREATE API PROVIDER WITH OPEN CONNECTOR TYPE

Hi guys, this is a first article in series SAP API Management (SAP APIM). As you known before, I wrote some article about APIM but that just is simple to understand concepts about APIM. Today, I will write more detail about APIM.

In this article, I want to share my understand about SAP APIM and for tutorial I will follow lesson 02 – API Provisioning in CLD900 Integration Suite Exam Certificate. Use open connector connect to API Slack. Create API Provider connect to slack. Create API base on API Provider. And end, Create Product on API Business Hub.

If you cannot see as picture, kindly go to Manage Capabilities and add it.

Login to open connector tenant.

To login you have to be authenticate by admin of open connector tenant, this guy is people who create subaccount and add capabilities open connector. If you done have permission, when you login you will receiver message

If you are admin of open connector tenant, and you want to add more member in this. Kindly follow these steps.

  • Logon into open connector tenant with role admin
  • Go to Security on menu
  • Tab identity
  • Add member

When you save your setting at first time, you will receive message

Don’t worry, just remove Roles <Account admin> and save again. After that you set role admin again. It’s will work.

Ok, now login by new member we will have

Ok, next we will use SLACK to demo for this article.

Create workspace on slack

  • Go to Slack
  • Create account and sign in
  • Create workspace and kindly note it to use later

After done, you will have

Connect to SLACK from open connector

  • Login Open Connector Tenant integration suite
  • Search SLACK
  • Add exactly workspace on SLACK into field Name
  • Add scope chat:write into OAuthScope.

Done.

Current, we can try test some API of SLACK on open connector

Create API Provider with type Open connector

In Open connector tenant, get this information in setting. This information will be used when create API provider connect to open connector.

  • Login to APIM
  • Go to configure
  • Create

(1) – Open Connector

(2) – Your region

(3) – Value is auto populated based on the selected region.

(4) – Value is auto populated

(5) & (6) : Get from setting of open connector tenant.

Connection test we will have

Create API from API Provider

Next, we will discover and create API from API Provider.

Go to APIM

Go to Develop

Create

Create

Go to tab resource we will have

Save

Deploy

TEST API

Go to APIM

Go to Test

Select API which you need to test

Send, we will receive result

TEST on POSTMAN

NOTE

  • You can see that no authentication for this API. We just add host and call. No good, no safety for this.
  • We need add some policy for this API for more security. Example you can add header API key which generated by server.

Add and configuration policy for API

Go to APIM

Go to develop

Go to API which apply policy

Edit

Select Proxy Endpoint

Select PreFlow

<!–Specify in the APIKey element where to look for the variable containing the api key–>
<VerifyAPIKey async=’true’ continueOnError=’false’ enabled=’true’
xmlns=’http://www.sap.com/apimgmt’>
<APIKey ref=’request.header.apikey’/>
</VerifyAPIKey>

Save

Deploy

Test again on POSTMAN, we will receive HTTPCODE is 401

Where will we receive API key ? Next, we will create product and subscribe API in API business hub to generate API KEY.

Create PRODUCT to bundle API

Go to APIM

Go to Develop

Tab Products

Create

Go to TAB APIs

Add

Save and publish

In this step, if you receive dialog box with message can not publish API . This issue comes because you have not registered developer user in API Business HUB Enterprise.

Go to API Business HUB Enterprise ( You have to be assigned ROLES  AuthGroup.SelfService.Admin, AuthGroup.API.ApplicationDeveloper)

Go to manage

Go to link Registered Users

Add yourself as an developer. Add email

Subscribe service and get API Key

Go to API Business Hub Enterprise

Choose product which you want connect . In this example, it is Slack product

Subscribe and choose new application or existing application

In screen create user, we have to determine create application for what register id, what PRODUCTS will be associated…

(2) – Register user in manage user

(3) – Product

Save

We will have API key like this

TEST POSTMAN with this API key

SUMMARY

In this article, I shared my understand about using open connector connect to API of SLACK. Create API Provider base on it and create product in API Business Hub. This is first article in series API Management in Integration Suite Standard Edition. Next article I will share How to build API Provider from Integration Flow, ODATA service. Thanks for your reading and any advise, kindly leave your comment on this. Thanks.

Joseph.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.