description |
---|
Validating and managing subscriptions |
A subscription is a successful contract between an API publisher and an API consumer. A subscription is created when an API consumer uses a registered application to make a subscription request to a published plan and an API publisher either manually or automatically validates the subscription.
{% hint style="info" %} Keyless plan subscriptions
APIs with Keyless plans do not require the API consumer to create an application or submit a subscription request because no authorization is required to access the backend API. {% endhint %}
This page includes the following sections:
API consumers can subscribe to APIs with published plans during the application creation process, or after the application is created, through the APIM Console or Developer Portal.
{% hint style="info" %}
Whether an application has an associated client_id
depends on how it was configured. To subscribe to OAuth2 or JWT plans, the application must have a client_id
.
{% endhint %}
To subscribe to an API via the APIM Console:
-
Log in to your APIM Console
-
Select Applications from the left nav
-
Select Subscriptions from the inner left nav
-
Click the + Create a subscription button
Create a subscription
-
Search for the API you want to subscribe to. To be searchable the API consumer must have access to the API, i.e., the API must be public or the API consumer must be a member of it.
-
Select the plan you would like to request a subscription to
Select the subscription plan
-
Click Create to see the subscription details
When creating a plan, you can enable subscription auto-validation to immediately approve subscription requests. If Auto validate subscription is disabled, the API publisher must approve all subscription requests.
{% hint style="info" %} To be notified of subscription validation tasks, enable Notifications {% endhint %}
To manage subscriptions in APIM Console:
- Log in to your APIM Console
- Select APIs from the left nav
- Select the API with subscriptions to manage
- Select Consumers from the inner left nav
- Click the Subscriptions header tab
- Select the request or subscription you want to manage
- Validate or reject the subscription
Subscriptions to API Key plans include additional security management settings:
-
Renew: Generate a new API key or provide a custom API key. The existing API key will be automatically invalidated after two hours.
Renew an API key
-
Revoke: Immediately invalidate an existing API key. This option is reversible.
Revoke an API key
-
Expire: Set a date/time to automatically invalidate an existing API key
Expire an API key
API publishers can transfer active subscriptions to a new plan with the same security type:
-
Log in to your APIM Console
-
Select APIs from the left nav
-
Select the API with the subscription to transfer
-
Select Consumers from the inner left nav
-
Click the Subscriptions header tab
-
Click the pencil icon of the subscription you want to transfer
-
At the bottom of the Subscription details section, click Transfer
Transfer a subscription
-
Select the plan to transfer the subscription to, then click Transfer
Specify and confirm subscription transfer