MuleSoft API Manager Overview
API Manager is the control center for your published APIs. It lets you register APIs, apply security and traffic policies, track which applications are consuming your APIs, set up SLA tiers, and monitor API health — all without touching application code. Any change you make in API Manager takes effect immediately on the running application.
What API Manager Controls
API Manager Capability Map
API Manager │ ├── API Registration → tell API Manager about your deployed API ├── Policy Management → apply security, rate limiting, validation ├── Client Application Mgmt → approve/revoke consumer app access ├── SLA Tiers → define usage plans with different limits ├── Analytics → request counts, response times, errors └── Alerts → notify when thresholds are breached
Registering an API in API Manager
Before applying policies, register your deployed API in API Manager. Registration tells API Manager what the API is, where it runs, and links it to a RAML/OAS specification from Exchange.
- In Anypoint Platform, open API Manager
- Click Add API → Add new API
- Select the runtime: Mule Gateway or Flex Gateway
- Select the deployment: CloudHub
- Select the API specification from Anypoint Exchange
- Enter the API instance label (e.g.,
orders-api-production) - Click Save — API Manager generates an API Instance ID
Linking Your Mule Application to API Manager
After registration, link your deployed Mule application to the API Manager instance. Add the API Instance ID to your application's configuration. The Mule application then reports metrics to API Manager and the API Gateway enforces policies.
Linking via Runtime Manager
In Runtime Manager:
Select your deployed application
Go to Settings → API Autodiscovery
Add:
API ID: 12345678 (from API Manager)
API Version: v1
In your Mule application XML:
<api-gateway:autodiscovery apiId="12345678" flowRef="orders-api-main" />
Result: API Manager now controls this application's gateway behavior.
The API Manager Dashboard
Dashboard Overview
API Manager Dashboard for "Orders API v1 - Production"
│
├── Summary Card:
│ Active Policies: 4
│ Registered Clients: 12
│ Requests Today: 48,320
│ Error Rate: 0.3%
│
├── Policies Tab
│ [Client ID Enforcement] ENABLED
│ [Rate Limiting: 100/min] ENABLED
│ [HTTPS Only] ENABLED
│ [JSON Threat Protection] ENABLED
│
├── Client Applications Tab
│ Mobile App v2 APPROVED last active: 2 min ago
│ Partner Portal APPROVED last active: 1 hour ago
│ Legacy Desktop REVOKED revoked: 2024-01-01
│ Web Dashboard APPROVED last active: 5 min ago
│
└── Analytics Tab
[Request Volume Chart]
[Response Time Chart]
[Error Rate Chart]
[Top Consumers Chart]
Environments and API Instances
API Manager maintains separate API instances per environment. Your Orders API has three instances: Development, Staging, and Production. Each has its own set of policies. The Development instance might have no authentication for easier testing. Production has all security policies enabled.
Multi-Environment API Instances
API: Orders API
│
├── Instance: orders-api-dev (Development environment)
│ Policies: none
│ Endpoint: http://orders-api-dev.cloudhub.io/orders
│
├── Instance: orders-api-staging (Staging environment)
│ Policies: Client ID Enforcement only
│ Endpoint: https://orders-api-staging.cloudhub.io/orders
│
└── Instance: orders-api-production (Production environment)
Policies: Client ID Enforcement + Rate Limiting + TLS + Threat Protection
Endpoint: https://api.mycompany.com/orders
API Manager Analytics
API Manager captures detailed analytics about every request your API receives. Use the Analytics tab to answer questions like: How many requests per day? Which endpoint is slowest? Which client sends the most traffic? What is the error rate by status code?
Analytics Metrics Available
Request Metrics: - Total requests (by day/hour/minute) - Requests per client application - Requests per endpoint - Policy violations (rejected requests) Performance Metrics: - Average response time - P95 response time (95th percentile) - P99 response time (99th percentile) Error Metrics: - Error rate by HTTP status code - 4xx errors by client - 5xx errors with timestamps Consumer Metrics: - Top 10 consumer applications - Requests per SLA tier - New client registrations over time
API Alerts in API Manager
Set automated alerts that notify your team when API health degrades. Alerts trigger on configurable thresholds and send notifications via email.
Alert 1: High Error Rate Metric: % errors (5xx responses) Threshold: > 5% over 5 minutes Action: Email ops-team@mycompany.com Alert 2: Response Time Degradation Metric: Average response time Threshold: > 2000 ms Action: Email api-owner@mycompany.com Alert 3: Unexpected Traffic Spike Metric: Requests per minute Threshold: > 500 rpm Action: Email security@mycompany.com
Autodiscovery
Autodiscovery automatically links your Mule application to an API Manager instance when the application starts. Instead of manually associating the application, you add an api-gateway:autodiscovery tag in the Mule XML and the runtime registers itself automatically. This is the standard approach for CI/CD pipelines where applications deploy automatically.
