Wednesday, May 20, 2015

#401 API Manager basics

Introduction


A short introduction to the product -

post #378 described how to install, let's now look at what we get.

To quote the ORCL docs -

Oracle API Manager facilitates the creation of APIs that expose functionality of
backend systems or other services. These APIs are published for use by application
developers and are managed and monitored at runtime.
API Manager is built on Oracle Service Bus. Proxy services created using Service Bus
can be published as APIs. API Curators decide which of these services should be
managed and exposed to developers. API Curators then add metadata and publish the
APIs to a developer portal, from which application developers subscribe to and view
information necessary to consume the APIs. Administrative users can use the
developer portal to monitor usage metrics and performance analytics at runtime.

Now to the roles -

API Curator: Users with this role use the Service Bus Console to curate the
metadata associated with and expose proxy services as APIs through the API
Manager Developer Portal. Users assigned this role have read-only access to the
remainder of the Service Bus Console so they can view artifact information.

API Consumer: Users with this role can use the API Manager Developer Portal to
view, subscribe to, and consume APIs. Users assigned this role have no access to
the Service Bus Console.

API Admin: Users with this role have administrative privileges for the API
Manager Developer Portal. API Admin users can view API usage metrics,
analytics information, and detailed subscription information for each User and
API. Users assigned this role have no access to the Service Bus Console.

Now that we have the general idea of what API Manager is, let's take a look at the components -

I will begin with em - because this is where you create the api manager users.

Create API Manager users in EM





















Here are the roles -










Assign our new consumer user to this role -






Assign our new mgr user to this role -









API Manager Portal

http://localhost:7001/apimanager

login as MyAPIConsumer/welcome1



Note the 3 tabs on the right -






Logout and login as MyAPIManager/welcome1









Service Bus Console

Here I have a simple SB pipeline that routes a request to a simple credit card
validation service I created.



































I edit the API values -


















Once published, we can see it in the portal -











Managed/ Un-managed?


















So what does this checkbox mean?

Back to the ORCL docs for an explanation -

A managed API is an access-controlled API. Per-user metrics are also available for
managed APIs. In order to successfully invoke a managed API, a user will first need to 
create an application and subscribe to a given managed API. 
The client must then invoke the API providing the API Key for the call to be successful.

Unmanaged APis can be invoked without subscription and without passing an
entitlement key at runtime.

API Subscription

Back in the portal as the consumer user -




















The consumer subscribes to APIs via an Application.








































Select the API -


















































Note the key - 9b0d5689-30b0-4b1f-bda7-09b3625348b1























No comments: