Skip to Content

In this blog, I will explain, challenges and advantages of SAP Cloud Platform API Management on Cloud Foundry Stack and how SAP Cloud Platform API Management enables you to manage your digital assets on Cloud Foundry.

Introduction of SAP Cloud Platform API Management on Cloud Foundry

Going forward more and more APIs will be built in cloud foundry as microservices, also using Cloud Extension SDK. In that cases, API Management capabilities that cover API lifecycle(Design, Develop, Manage, Analytics and Engage) is critical. SAP Cloud Platform API Management enables you to manage your digital assets on Cloud Foundry. It acts as a service broker in the Cloud Foundry marketplace that can be used to create an instance and connect to your existing Neo subscription. You can then bind your Cloud Foundry application to the created service instance which automatically creates an API Proxy in your API Portal

For more details refer blog1 and blog2

Challenges

  • How can we governing APIs, Microservices, Applications build in cloud foundry?
  • How can we provide API lifecycle management in cloud foundry?
  • How can we get statistics of APIs build in cloud foundry?
  • How can cloud foundry APIs be combined with other managed APIs in API Product and published to Developer Portal?
  • How can cloud foundry developers find endpoints, test, subscribe and use it.

Solution and Benefits

SAP Cloud Platform API Management as Service Broker on Cloud Foundry enables the following:

1.    Manages microservices/APIs/applications on Cloud Foundry Stack

2.    Enables API Governance in Cloud Foundry

3.    Provides API Lifecycle Management in Cloud Foundry

4.    Helps in developer engagement.

High-level Architecture

Pre-Requisites

  • Install cf cli (https://docs.cloudfoundry.org/cf-cli/install-go-cli.html#windows)
  • Cloud Foundry trial account in Frankfurt
  • Neo trial account with API management service

Creating an API Management Service Instance

Log-on to trial cockpit https://account.hanatrial.ondemand.com/cockpit and click on Cloud Foundry Trial.Select the region and click OK

Wait for its processing and then click on Go to Space.

Navigate to Services and then to Service Marketplace and Search for API Management

Click on the tile and Navigate to instance

Fill the specified parameters as shown and click on next

Click on Next fill the details and leave the application name as blank and save it.

Creating Cloud Foundry application

To create and deploy Cloud Foundry application refer following links

  • https://lethalbrains.com/deploying-a-node-js-and-mongodb-application-in-sap-cloud-platform-6920ad3ca98a
  • https://github.com/SAP/hcp-cloud-foundry-tutorials
  • https://github.com/cloudfoundry-samples?utf8=%E2%9C%93&q=node&type=&language=

Deploying and Binding your Cloud Foundry Application

Login to your Cloud Foundry space via the Command Line Interface (CLI). Invoke the following route service binding command to create the API Proxy in your Neo subscription.

cf bind-route-service sap-cf-domain.com apim-service-instance-name –hostname my-cf-app -c ‘{“api_name” : ”custom_api_proxy_name”}’

For Eg: cf bind-route-service cfapps.sap.hana.ondemand.com APIMServiceInstance –hostname eProductStore

Note: The api_name is an optional parameter in case you want a custom name for your API Proxy. Else it is created with an auto-generated name.

With this, all calls to your application will be routed through API Management and an API Proxy gets created in your API Portal.

Managing in API Portal

You could go ahead and add Policies to bring in additional security or control traffic, quota etc.

In order to allow or deny access of the API to specific client IP or IP ranges access control policy can be used. This is done in the following blog entry.

Further Reads

  • API Security Best Practices Blog Series
  • For more blogs on SAP Cloud Platform, API Management visit us at SCN
To report this post you need to login first.

4 Comments

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

  1. Shilpa Vij Post author

     

    Hello Jitendra,

    You can try creating one more user and with that user login to SCP (Frankfurt trial).

    Regards

    Shilpa

     

    (0) 
    1. Jitendra Kansal

      With my new trial user, i can now see “API Management”

      (for my other p-user, CF trial account was expired, i extended it but still cant see “API Management” over there) 

      (0) 

Leave a Reply