Backends in API Management
A backend (or API backend) in API Management is an HTTP service that implements your front-end API and its operations.
When importing certain APIs, API Management configures the API backend automatically. For example, API Management configures the backend when importing:
- An OpenAPI specification.
- A SOAP API.
- Azure resources, such as an HTTP-triggered Azure Function App or Logic App.
API Management also supports using other Azure resources as an API backend, such as:
- A Service Fabric cluster.
- A custom service.
Custom backends require extra configuration to authorize the credentials of requests to the backend service and define API operations. Configure and manage custom backends in the Azure portal, or using Azure APIs or tools.
After creating a backend, you can reference the backend in your APIs. Use the
set-backend-service policy to redirect an incoming API request to the custom backend instead of the default backend for that API.
When you use the
set-backend-service policy to redirect requests to a custom backend, refer to the backend by its name (
backend-id), not by its URL.
Benefits of backends
A custom backend has several benefits, including:
- Abstracts information about the backend service, promoting reusability across APIs and improved governance.
- Easily used by configuring a transformation policy on an existing API.
- Takes advantage of API Management functionality to maintain secrets in Azure Key Vault if named values are configured for header or query parameter authentication.
For Developer and Premium tiers, an API Management instance deployed in an internal virtual network can throw HTTP 500
BackendConnectionFailure errors when the gateway endpoint URL and backend URL are the same. If you encounter this limitation, follow the instructions in the Self-Chained API Management request limitation in internal virtual network mode article in the Tech Community blog.