November 20, 2014 | Written by: Sajan Sankaran
Categorized: Community | How-tos
Share this post:
With the Bluemix Private Catalog, delivered through our Cloud Integration service, developers in your organization can discover, bind and use your APIs as a service from the Bluemix Catalog.
This articles shows the simple steps to
* create an API from an on-premises database table
* publish an API as a Private Service and
* discover, bind and use the API in an application.
Create an API
You can easily create REST APIs using Cloud Integration from on-premises databases, applications, existing REST or Web Services, Cast Iron Live orchestrations and other Bluemix applications. You can expose APIs created from any of these sources as a Private Service in Bluemix Catalog.
In this example we will build a REST API from an on-premises database. With a secure connection to the on-premises database, Cloud Integration lets you list the schema and tables from that database. You can then choose the table that you would like to access as a REST API. PRODUCT table is selected in this example.
You can choose the CRUD operations to support as part of this REST API. In this example we have decided to allow only the read operation from the table.
The API is successfully created and the Resources section displays the URL for API invocation along with required and optional parameters and a sample JSON response object.
Publishing an API
Publishing an API as a Private Service is as simple as clicking the Publish API button. This exposes your newly created API as a service in the Bluemix Catalog under the Private Services category.
Private Services are only visible to members of your organization. Your Private Service shows as a new tile in the Bluemix Catalog and is easily distinguishable by the orange border and the orange ‘Private’ tag at the bottom of the tile.
Discover and Use a Private Service
An application developer then can bind to your service to their applications and start utilizing the APIs exposed in that service.