DEV Community

Kalana Heshan
Kalana Heshan

Posted on

Your APIs are shipping. Your API platform is not.

WSO2 API Manager gives you the publish-discover-govern-observe loop that every growing engineering org needs — before the API sprawl becomes a support ticket you can't close.

Most teams discover they need an API management platform the hard way. It usually starts with a Slack message: "Hey, which version of the payments API should I be calling?" Then comes the rate-limit incident. Then the audit that asks for a list of every external consumer of your internal APIs. Then the realization that nobody knows who deprecated what, or when.

WSO2 API Manager (APIM) exists to close that gap — not by bolting a portal onto an existing gateway, but by treating API lifecycle management as a first-class discipline. It is a full-stack API platform: gateway, developer portal, publisher portal, traffic manager, and analytics engine, all integrated and deployable on your own infrastructure.

"An API without a lifecycle is just a URL. An API without governance is a liability waiting to be discovered."


What the Platform Actually Covers

Before diving into specifics, it helps to understand the four jobs WSO2 APIM does simultaneously. Most competing tools do one or two of these well; APIM does all four as a unified system:

  • 01 — Publish & Design: Create, version, and publish APIs with OpenAPI / AsyncAPI specs. Policy attachment at design time, not deployment time.
  • 02 — Discover & Consume: Self-service developer portal with API catalog, interactive try-it console, SDK generation, and subscription management.
  • 03 — Secure & Govern: OAuth 2.0, JWT, API key, mutual TLS. Rate limiting, quota management, IP allowlisting — per-API and per-subscription.
  • 04 — Observe & Analyze: Real-time traffic analytics, latency percentiles, error rate tracking, subscription-level usage reports, and alerting.

The Core Problem: API Lifecycle Without Governance Becomes Chaos

Here's a scenario that plays out in teams at roughly the 50-engineer mark. You have 40 internal APIs. Some are versioned, most aren't. Three teams call the same upstream service through different wrappers they built independently. External partners are using v1 of an API you deprecated eight months ago because nobody sent them a deprecation notice, and nobody enforced a sunset date.

This isn't an API problem. It's a lifecycle governance problem. WSO2 APIM addresses it with an explicit state machine for every API:

CREATED ──→ PUBLISHED ──→ DEPRECATED ──→ RETIRED

↕ BLOCKED state available at any point — instantly suspends traffic

PROTOTYPED ──→ PUBLISHED   // prototype path for sandbox testing
Enter fullscreen mode Exit fullscreen mode

Each transition is a deliberate action, not an accident. When an API moves to DEPRECATED, the developer portal automatically surfaces a deprecation notice to all subscribers. When it moves to RETIRED, the gateway rejects requests — no custom code, no coordination meeting required. The policy is the state.


The Gateway: Where Policies Become Reality

The gateway layer in WSO2 APIM is built on a high-performance Synapse mediation engine, with a newer Choreo Connect option for a lightweight, cloud-native Envoy-based deployment. Every API request passes through the gateway, which enforces the policies attached at publish time.

What makes this powerful isn't the enforcement itself — every gateway does that — it's the granularity of the policy model. WSO2 APIM applies policies at four distinct levels:

Level Scope Example Use
API-level Applies to all traffic on an API regardless of consumer Backend timeout, TLS enforcement, CORS
Resource-level Applies to a specific HTTP method + path combination Stricter rate limit on POST /orders vs GET /orders
Application-level Applies to a specific subscriber application Platinum tier gets 10k req/min, free tier gets 100
Subscription-level Applies to the binding between an app and an API Monetized access tiers, burst controls per contract

This layered model means a single API can behave differently for different consumers without branching your backend code or deploying multiple gateway configurations. A partner on a premium contract gets higher limits and fewer restrictions than a free developer — all controlled through the publisher portal, not through code.


Rate Limiting: More Than Just Request Counts

WSO2 APIM's traffic management goes well beyond simple request-per-minute counters. The throttling engine supports several distinct policy types.

Subscription throttling

Define tiers — Bronze, Silver, Gold, Unlimited — and attach them to subscription plans. Developers choose a tier when they subscribe, and the gateway enforces it automatically. Tiers can be monetized through billing integration.

Advanced throttling

Condition-based policies that can throttle on IP range, header value, JWT claim, or query parameter. A common pattern: throttle all traffic from unverified IP ranges to 10 req/min, let internal CIDR blocks through unlimited:

<!-- advanced-throttle-policy.xml -->
<AdvancedThrottlePolicy>
  <DefaultLimit>
    <RequestCount>
      <Limit>1000</Limit>
      <UnitTime>60</UnitTime>
      <TimeUnit>min</TimeUnit>
    </RequestCount>
  </DefaultLimit>

  <ConditionalGroups>
    <ConditionalGroup>
      <!-- Trusted internal network: unlimited -->
      <Condition type="IPRange">
        <StartIP>10.0.0.0</StartIP>
        <EndIP>10.255.255.255</EndIP>
      </Condition>
      <Limit>-1</Limit> <!-- unlimited -->
    </ConditionalGroup>
  </ConditionalGroups>
</AdvancedThrottlePolicy>
Enter fullscreen mode Exit fullscreen mode

Burst control

Separate from sustained rate limits, burst control handles spike scenarios. You can allow 5,000 req/hour but cap bursts to 200 req/minute, smoothing traffic without rejecting legitimate sustained workloads.

📊 Real-world note: WSO2 APIM's traffic manager uses a distributed counter via a shared database or JMS bus, which means rate limits are enforced consistently across all gateway nodes in a cluster — you don't get the "lucky gateway" problem where one node lets traffic through because it hasn't synced its local counter yet.


The Developer Portal: Self-Service That Actually Works

The most underrated component in any API management platform is the developer portal. A bad portal means developers bypass it — they email your team directly, get credentials out-of-band, and your governance story falls apart at the first touchpoint.

WSO2 APIM's developer portal is built for real self-service:

  • Full OpenAPI spec rendering with interactive try-it console (no Postman required)
  • Application creation and API key / OAuth token generation without admin involvement
  • Subscription management — pick a tier, get credentials, start calling
  • SDK generation in Java, Python, JavaScript, Ruby, PHP, and more via Swagger Codegen
  • Changelogs, deprecation notices, and version comparison surfaced automatically
  • GraphQL APIs documented with schema explorer alongside REST APIs

The portal is fully themeable — you can white-label it to match your internal design system or external brand. The underlying React application is open and forkable if you need deeper customization.


API-as-Code: The Publisher REST API

Every operation available in the publisher portal is exposed through a REST API, which means your entire API publishing workflow can be automated through CI/CD. This is the pattern that separates teams who "use APIM" from teams who "run an API platform."

A typical GitOps-style API deployment pipeline:

openapi.yaml (commit to git)
  ──→ CI validates (lint + schema check)
  ──→ APIM Publisher API (create / update)
  ──→ Auto-publish to gateway
Enter fullscreen mode Exit fullscreen mode

The Publisher REST API (v4) supports the full API lifecycle programmatically. Here's a minimal example of creating and publishing an API from a spec file:

# Step 1: Get an OAuth token for the publisher
TOKEN=$(curl -s -X POST \
  https://apim-host:9443/oauth2/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=password&username=admin&password=admin&scope=apim:api_create apim:api_publish" \
  | jq -r '.access_token')

# Step 2: Import API from OpenAPI spec
API_ID=$(curl -s -X POST \
  https://apim-host:9443/api/am/publisher/v4/apis/import-openapi \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@./openapi.yaml" \
  -F 'additionalProperties={"name":"PaymentsAPI","version":"v2","context":"/payments/v2"}' \
  | jq -r '.id')

# Step 3: Publish
curl -X POST \
  "https://apim-host:9443/api/am/publisher/v4/apis/$API_ID/change-lifecycle?action=Publish" \
  -H "Authorization: Bearer $TOKEN"
Enter fullscreen mode Exit fullscreen mode

Three curl calls. Your API goes from a spec file in git to a live, gateway-enforced, portal-visible endpoint. Wrap this in your existing CI pipeline and every API change gets the same deployment rigor as your application code.


GraphQL, AsyncAPI, and WebSocket Support

WSO2 APIM is not a REST-only platform. Modern applications communicate over multiple protocols, and the gateway handles all of them:

API Type Spec Format Gateway Support
REST OpenAPI 3.x / Swagger 2.0 Full — mediation, policies, analytics
GraphQL SDL schema Schema validation, depth/complexity limits, field-level auth
WebSocket AsyncAPI Connection throttling, JWT auth on handshake, frame logging
SSE / Streaming AsyncAPI Event stream proxying with subscriber auth
gRPC Proto definitions Supported via Choreo Connect (Envoy-based)

The GraphQL support is particularly useful — the gateway can enforce query complexity limits and field-level authorization without your backend GraphQL server needing to implement any of it. A malicious or poorly-written client query that would hammer your resolver graph gets rejected at the gateway before it reaches your service.

Architecture note: For high-throughput event-driven APIs, WSO2 APIM can proxy to Kafka, RabbitMQ, or any AMQP/MQTT broker via its streaming gateway. Consumer applications subscribe through the developer portal the same way they would for a REST API — the protocol difference is invisible to them.


Deployment Topology: From Single-Node to Multi-Region

WSO2 APIM's components can run as a monolith for smaller deployments or split into dedicated nodes for scale. The five logical components are:

  • Gateway — handles runtime API traffic
  • Traffic Manager — enforces throttle policies across the cluster
  • Publisher — API design and lifecycle management UI + API
  • Developer Portal — consumer-facing catalog and subscription portal
  • Key Manager — token issuance and validation (integrates with WSO2 IS)

For production, the recommended pattern separates the Gateway from the control plane (Publisher, Portal, Traffic Manager), with the Key Manager role delegated to WSO2 Identity Server. This gives you independent horizontal scaling of the data plane:

# kubernetes/apim-gateway-deployment.yaml (excerpt)
apiVersion: apps/v1
kind: Deployment
metadata:
  name: wso2-apim-gateway
spec:
  replicas: 3  # scale independently from control plane
  template:
    spec:
      containers:
        - name: wso2am-gateway
          image: wso2/wso2am:4.3.0
          env:
            - name: PROFILE_NAME
              value: "gateway-worker"
            - name: WSO2_SERVER_DB_URL
              value: "jdbc:postgresql://pg:5432/apimgt"
          readinessProbe:
            httpGet:
              path: /services/Version
              port: 9763
Enter fullscreen mode Exit fullscreen mode

Where WSO2 APIM Fits Against Alternatives

Platform Best Fit Watch Out For
WSO2 APIM Enterprise, on-prem/hybrid, full lifecycle management, OSS Java ops overhead; steeper initial setup than SaaS options
Kong Gateway High-performance gateway, plugin-first extensibility Developer portal and lifecycle management require separate tooling
AWS API Gateway AWS-native workloads, serverless integration AWS lock-in; limited developer portal; per-call pricing at scale
Apigee Large enterprise, Google Cloud ecosystem Expensive; Google Cloud dependency; complex pricing model
MuleSoft Integration-heavy orgs with ESB needs alongside API mgmt Very high licensing cost; Salesforce ecosystem dependency

The case for WSO2 APIM is strongest when you need a complete platform — lifecycle, gateway, portal, analytics — without vendor lock-in, and when running on your own infrastructure is a hard requirement. Financial services, healthcare, and government organizations gravitate to it specifically because they control the deployment.


Getting Started in Under 10 Minutes

The fastest path to a running APIM instance is Docker. WSO2 publishes a single-node image that brings up the full control plane and gateway together, suitable for local development and evaluation:

# Pull and start — single-node all-in-one
docker pull wso2/wso2am:4.3.0
docker run -d \
  -p 9443:9443 \   # Publisher, Portal, Admin console
  -p 8243:8243 \   # HTTPS gateway
  -p 8280:8280 \   # HTTP gateway
  --name wso2am \
  wso2/wso2am:4.3.0

# Publisher portal (create and publish APIs)
open https://localhost:9443/publisher   # admin / admin

# Developer portal (subscribe and get credentials)
open https://localhost:9443/devportal
Enter fullscreen mode Exit fullscreen mode

From there: import an OpenAPI spec in the publisher, publish it, switch to the developer portal, create an application, subscribe, generate a token, and make your first gateway-proxied call — the full loop takes about 8 minutes the first time.

"The goal isn't to manage APIs. The goal is to make API consumption so seamless that developers stop asking your team for help and start shipping instead."


Final Thoughts

WSO2 API Manager is a platform investment, not a drop-in tool. The operational footprint is real — you're running a Java-based distributed system that deserves proper monitoring, database management, and upgrade planning. Teams that treat it like a simple proxy will underuse it and resent the overhead.

But for organizations that take API governance seriously — where "who is consuming this endpoint and under what contract" is a real question that needs a real answer — WSO2 APIM provides the system of record. The lifecycle model, the layered policy engine, the self-service developer portal, and the CI/CD-friendly publisher API together form something that ad-hoc gateway configurations never will: a platform your API consumers can actually trust.

If you're at the point where API sprawl is costing you more in coordination overhead than the platform would cost to run, that's the inflection point. Start with the Docker image, run through the full publish-subscribe-consume loop, and see whether the governance model fits how your organization works. Most teams that do the evaluation seriously don't go back.

Top comments (0)