New APIs as a Product features - August 12th, 2020

Updated -

Managing APIs as Products

APIs as a Product introduces a new way to manage your APIs in 3scale. Now the configuration for your internal APIs (aka 'Backends') is separated from your customer-facing APIs (aka 'Products'). Some of the key features are:

  • Ability to bundle any number of Backends and expose them as one single API Product
  • Backend can be re-used to form part of multiple Products
  • API consumers can access multiple Backends using a single set of credentials
  • Monitor and control global metrics at the Product level and also at Backend level
  • Easier/better support for managing a large number of APIs

On the dashboard, instead of a list of APIs, you now find an API’s section with two tabs: Products and Backends.

[image=[src="images/annotation_2020-08-12_124542.png", title="Product & backend tabs in admin dashboard", alt="Product & Backend tabs provide an easy to manage interface on the admin dashboard", size="LG - Large", data-cp-size="100%", lightbox="true"]]

Products

API Products define how your APIs are being consumed:

  • Consumer-facing APIs that your organization makes available for developers (Public facing “facade” and URL structure).
  • Composed by one or more Backends.
  • Product Application plans: Prices / Limits at Product and Backend level
  • Developers can sign-up to access the API Backends in the Product with a single set of credentials.
  • Gateway policies.

Products still expose publicly managed endpoints and continue to have application plans, limits, monetization rules, etc.

Products may use one or multiple API backends, with path-based routing rules that direct the traffic against the Product API to the corresponding Backend API.

[image=[src="images/annotation_2020-08-12_125404.png", title="Product backend usages view", alt="Add one or more Backend APIs to the Product each with a unique path for routing", size="LG - Large", data-cp-size="100%", lightbox="true"]]

Backends

  • API Backends represent the technical and organizational part of your internal APIs.
  • Private base URLs
  • Private URL structures
  • No AuthN/AuthZ → no plans
  • (Local) metrics/mapping rules (by method)
  • Can be used by multiple API products

[image=[src="images/annotation_2020-08-12_125821.png", title="Backend overview page with all the configuration options", alt="Backend APIs can be configured with a Private Base URL, local mapping rules and added to multiple Products from the Backend overview page", size="LG - Large", data-cp-size="100%", lightbox="true"]]

Routing & Mapping Rules

Each Backend bundled in a Product is “mounted” in a chosen path; paths must be unique. Path is removed from the URL before redirecting the traffic.

Mapping rules can be defined at product and backend level.

Product-level Mapping Rules

  • Take precedence – i.e. go on top of all MRs
  • Always evaluated, no matter to which Backend the traffic will be routed

Backend-level Mapping Rules

  • Evaluated after Product-level MRs
  • Evaluated only if the traffic is being routed to the same Backend the Mapping Rule belongs to
  • Same set of MRs exists in all Products using the Backend
  • The path of the Backend in a given Product is automatically and transparently prepended to each MR of the Backend in that Product

Q&A

What happened to the configuration of my existing APIs?

Each of your APIs has been converted into an API Product and a Backend in a one to one relation; everything continues working as normal. From now on, you will be able to use more than one backend to define your API Products.

Do any of these changes affect the content shown in the Developer Portal?

No, this change doesn’t affect the content shown in the developer portal. Customers interact with API Products, never directly with API backends.

What is the information available for analytics and usage statistics?

In the analytics section of a product you can see the usage of each backend in that product. In the analytics section of a backend you can see the overall usage of that backend.

Which versions of the API Gateway are compatible with these features?

IMPORTANT: Only the latest versions of 3scale’s API gateway support multiple Backends (APIcast is compatible with API Products composed of more than one Backend since version 3.7). Make sure you are always running a supported version of the gateway.

Comments