Create a Usage Plan

Each API Product defines Usage Plans specifying the tiers of access given to API clients, including how clients are authenticated and rate limited to the APIs they consume.

In this guide we are going to create a Usage Plan for an existing API Product through the Admin Dashboard. Users and groups will be associated with the Usage Plan in a separate guide.

Pre-requisites

You will need to have the Dev Portal deployed on a Kubernetes cluster, and a connection to the Admin Dashboard as described in the Using the Admin Dashboard guide.

You will also need the following items provisioned in the Dev Portal:

You can follow the guides linked above to perform the action through the Admin Dashboard or go through the Getting started guide to provision these resources using kubectl.

Create a Usage Plan

Usage Plans are created from the context of an API Product. We will open an existing API Product and create the plan from the Plans tab in the product’s properties.

We will start from the Overview page of the Dev Portal. First you will click on the APIs item in the navigation bar to manage API Docs, Products, Routes, and more.

Admin Dashboard Nav Bar

The page should load on the API Products category by default. Select the Petstore Product v2 API Product you created in an earlier guide.

Admin Dashboard Nav Bar

In the properties of the API Product, select the Plans tab and click on Create a Plan.

Admin Dashboard Nav Bar

On the General page, you will fill out the basic fields for the new plan.

Admin Dashboard Create User General

In our example we are going to use the following values:

The Auth Policy field only supports the value API Key for the moment. Future versions of the Dev Portal will support alternative auth policies.

Click on Create API Product to complete the process. The Usage Plan will now appear under the Plans tab.

Admin Dashboard Create User General

We created a Usage Plan that uses the API Key authentication policy and limits requests to five per minute. Once a user or group is associated with this plan, they will be able to provision an API Key and access the API Product.

Next steps

Now that you have successfully created a Usage Plan for an API Product, the next step in the process is to associate users and groups with the Usage Plan and test their access.