Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO: All API Management tiers
With the Azure API Management service platform, you can:
- Publish APIs, to which your consumers subscribe.
- De-risk implementation.
- Accelerate project timescales.
- Scale your APIs with confidence.
In this document, we focus on API Management features that enable the implementation of your monetization strategy, like providing a frictionless experience to:
- Discover your public APIs.
- Enter payment details.
- Activate a subscription.
- Consume the API.
- Monitor usage.
- Automatically pay for usage of the API.
The following diagram introduces these key API Management features:
API discovery
Launch your API and onboard API consumers using API Management's built-in developer portal. Emphasize good quality development content for the developer portal, allowing API consumers to explore and use your APIs seamlessly. Test the content and information provided for accessibility, thoroughness, and usability.
To learn how to add content and control the branding of the developer portal, see Overview of the developer portal.
API packaging
API Management lets you manage how your APIs are packaged and presented using the concept of products and policies.
Products
APIs are published through products. Products allow you to define:
- Which APIs a subscriber can access.
- Specific throttling policies, like limiting a specific subscription to a quota of calls per month.
When an API consumer subscribes to a product, they receive an API key that they can use to make calls. Initially, the subscription is set to a submitted state. Activate the subscription to allow subscribers to use the APIs.
You can configure the API Management products to package your underlying API to mirror your revenue model, with:
- A one-to-one relationship between each tier in your revenue model.
- A corresponding API Management product.
Example projects use API Management products as the top-level means of codifying the monetization strategy. The API Management products mirror the revenue model tiers and index the specific pricing model for each tier. This setup provides a flexible, configuration-driven approach to preparing the monetization strategy.
Policies
Apply API Management policies to control the quality of service for each product. Example projects use two specific policy features to control quality of service, in line with the revenue model:
| Policy feature | Description |
|---|---|
| Quota | Defines the total number of calls the user can make to the API over a specified time period, for example, 100 calls per month. Once the user reaches the quota, the calls to the API fail and the caller receives a 403 Forbidden response status code. |
| Rate limit | Defines the number of calls over a sliding time window that can be made to the API, for example, 200 calls per minute. Designed to prevent spikes in API usage beyond the paid quality of service with the chosen product. When the call rate is exceeded, the caller receives a 429 Too Many Requests response status code. |
For more details about policies, see Policies in Azure API Management.
API consumption
Grant access for API consumers to your APIs via products using API subscriptions.
- API consumers establish API subscriptions when signing up for a specific API Management product.
- Integrate the subscription process with the payment provider using API Management delegation.
- After successfully providing payment details, users gain access to the API with a generated, unique security key for the subscription.
For more information about subscriptions, see Subscriptions in Azure API Management.
API usage monitoring
You can gain insights about your API usage and performance by using API Management's built-in analytics. These analytics provide reports by:
- API
- Geography
- API operations
- Product
- Request
- Subscription
- Time
- User
Review the analytics reports regularly to understand how your monetization strategy is being adopted by API consumers.
For more information, see Monitor API Management.
Security
Control the access level for each user to each product using API Management's products, API policies, and subscriptions. Prevent misuse and abuse by granting subscription-level API access if the user has successfully authenticated with the payment provider, even if the specific API product is free.
Integration
Create a seamless monetization experience through both front-end and back-end integration between API Management and your chosen payment provider. Use API Management delegation for front-end integration and the REST API for back-end integration.
Delegation
In the example projects, you can use API Management delegation to make custom integrations with the partner payment providers. The demo uses delegation for both the sign-up/sign-in and product subscription experiences.
Sign-up/Sign-in workflow
- The developer selects the sign-in or sign-up link at the API Management developer portal.
- The web browser redirects to the delegation endpoint (configured to a page in the custom billing portal app).
- The custom billing portal app presents a sign-in/sign-up UI.
- Upon successful sign-in/sign-up, the user is authenticated and redirected back to the starting API Management developer portal page.
Product subscription workflow
- The developer selects a product in the API Management developer portal and chooses the Subscribe button.
- The web browser redirects to the delegation endpoint (configured to a page in the custom billing portal app).
- The custom billing portal app:
- Presents a UI configured based on the payment provider (Stripe or Adyen).
- Takes the user through the relevant checkout process.
- The user is redirected back to the starting API Management product page.
- The product is active and the API keys are available.
REST API
Use the REST API for API Management to automate the operation of your monetization strategy.
The sample projects use the API to programmatically:
- Retrieve API Management products and policies to enable synchronized configuration of similar concepts in payment providers, such as Stripe.
- Poll API Management regularly to retrieve API usage metrics for each subscription and drive the billing process.
For more information, see Azure API Management REST API reference.
DevOps
Implement version control and automate deployment changes to API Management by using Azure Resource Manager, including configuring features that implement your monetization strategy, like:
- Products
- Policies
- The developer portal
In example projects, the Azure Resource Manager scripts are augmented by a JSON file, which defines each API Management product's pricing model. With this augmentation, you can synchronize the configuration between API Management and the chosen payment provider. The entire solution is managed under a single source control repository, to:
- Coordinate all changes associated with the ongoing monetization strategy evolution as a single release.
- Carry out the changes, following governance and auditing requirements.
Initialization and deployment
API Management can be deployed either through:
- The Azure portal
- An infrastructure as code approach using Azure Resource Manager templates