Entitlements
This chapter describes the role of entitlements in IBM API Management and their relevance to API Consumers.
This chapter contains the following topics:
4.1 Overview of entitlements
An entitlement is a mechanism that allows you to meter API usage in IBM API Management. This functionality is important for two reasons:
You will have implemented a business model for your API that will most likely be based on tiered bands according to price. With entitlements, you can realize such a business model using IBM API Management. The following examples are common:
 – A basic access level capped at a low rate for discovery and learning
 – A standard tier intended for mid-market API consumption with an appropriate usage rate
 – A professional tier with a high usage rate for a premium price
The services you are exposing using IBM API Management will already have established SLAs monitored by using key performance indicators. Entitlements allow you implement usage rates to ensure the existing SLAs are not breached by the API channel.
4.2 Implementing entitlements in IBM API Management
With IBM API Management you can create entitlements using the API Manager. You can create two types of entitlement:
Local: Created for use with a specific API.
Global: Reusable entitlements that can applied to any API defined in your API Manager. If you have a limited number of scenarios that will be common across the API definitions you create, consider creating this type of entitlement.
 
Important: The descriptions local and global are relevant as a qualifier for your intent in how you will use an entitlement. When entitlements are created in IBM API Management, they are always global in scope because they can be implemented in any API definition.
4.2.1 Creating a local entitlement
To start working with entitlements, log on to the API Manager, click Create, choose an API you previously defined, and then complete the following steps:
1. Click the Entitlements & Authentication tab (Figure 4-1). This displays a list of the entitlements that apply to the API and includes local and global entitlements. If the API you clicked is newly created, a default entitlement is displayed that is added by the API Manager on creation.
Figure 4-1 Defining local entitlements
2. Click Select Entitlements.
The Select Entitlements prompt opens (Figure 4-2). You can select either local or global entitlements to be added to the API.
Figure 4-2 Selecting existing entitlements
3. Click Create New. The prompt shown in Figure 4-3 on page 75 opens, where you can define new local entitlement. Enter properties for the entitlement as follows:
 – Use a meaningful name for the entitlement. For example, your developer community might be cognizant of names such as Standard, Gold, and Platinum. A description of the entitlement can also be added.
 – Authentication to use an entitlement is required, which is based on an application ID. The authorization requirement can be set either to Requires Id or Requires Id and Secret, depending on your needs. The requirement for an application to be authorised to use an entitlement can also be added by selecting the Requires Approval check box.
 
Note: Authorization to use an entitlement is described in Chapter 9, “Developer Portal” on page 189.
 – Add the number and types of calls that the entitlement grants. The entitlement can be quantified in periods of minutes, hours, days, or weeks.
Figure 4-3 Creating a new local entitlement
4. Click Create. The new entitlement is displayed, as shown in Figure 4-4.
Figure 4-4 Update entitlements list
4.2.2 Creating a global entitlement
Global entitlements are created with exactly the same properties as local entitlements. To start working with global entitlements, log on to the API Manager and complete the following steps:
1. Click Socialize → Customize Portal → Entitlements. The list of available entitlements is displayed. Click Add an Entitlement.
The same prompt as shown for a local entitlement is displayed (Figure 4-5).
Figure 4-5 Defining a global entitlement
2. Click API Manager → Create. Select an existing API, and then click Entitlements & Authentication → Select Entitlements. The entitlement will be available to select for assignment to the API as shown in Figure 4-6.
Figure 4-6 Adding a global entitlement
4.3 Scenario: Defining the JKHLE Airways entitlements
Steve works with Will to set the appropriate entitlement levels according to the capabilities of the JKHLE back end and the business plan. They envisage two entitlement levels:
A basic entitlement for developers to use when building their application, set at 60 calls per minute. Because this is envisioned to be a common requirement for all JKHLE APIs, a global entitlement will be used.
A premium entitlement for use in production, set at 10000 calls per minute with heightened requirements for authorization. This will be implemented as a local entitlement to segregate it from APIs that may be implemented in the future.
The default entitlement created with the API definition will be removed because it is not required for the API.
4.3.1 Creating the basic entitlement
The basic entitlement is created using the Entitlements functionality under the Socialize menu. Log on to the API Manager and complete these steps:
1. Click Socialize → Customize Portal → Entitlements  Add an Entitlement. Enter the details, as shown in Figure 4-7, and click Save & Apply.
Figure 4-7 Adding the basic entitlement
2. Click Entitlements → APIs → JKHLE API → Entitlements & Authentication. Deselect the default entitlement to remove it. Select the JKHLE Basic entitlement, as shown in Figure 4-8. Click Done.
Figure 4-8 Adding the JKHLE Basic entitlement to the JKHLE API
The entitlement is added to the JKHLE API entitlements list (Figure 4-9).
Figure 4-9 Basic entitlement listed in JKHLE API
4.3.2 Creating the premium entitlement
The premium entitlement is created immediately after the basic entitlement using the Entitlements & Authentication page and perform these steps:
1. Click Select Entitlements → Create New. Enter the details shown in Figure 4-10. Click Create.
Figure 4-10 Creating the premium entitlement
2. The premium entitlement is displayed (Figure 4-11) and requires an application ID, secret, and approval by an administrator to be used.
Figure 4-11 Premium entitlement listed in the JKHLE API
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.86.18