liveBook · Manning

WSO2 API Manager

As explained in Build Financial Software with Generative AI (From Scratch)

An API manager is software that provides centralized capabilities for publishing, securing, governing, documenting, monitoring, and managing APIs.

WSO2 API Manager centralizes the publishing, securing, documenting, monitoring, and lifecycle management of APIs. Introducing it early helps keep a growing API manageable before production clients make changes difficult. section 4.6

Centralizing APIs creates several practical benefits:

  • Routes requests through a single endpoint, even when services run on different servers or use different authentication requirements. section 4.6.1
  • Applies authentication, authorization, rate limiting, load balancing, and lifecycle management across APIs. section 4.6.1
  • Provides a common console where users can discover, subscribe to, and manage API offerings. section 4.6.1
  • Exposes analytics such as call counts and API-version usage, supporting operational decisions and usage-based monetization. section 4.6.1

A Docker-based setup adds WSO2 as a service. The management console uses port 9443, while ports 8243 and 8280 receive HTTPS and HTTP requests. After building and starting the composition, the console is available with the default admin credentials. section 4.6.2

Putting an API behind WSO2

Create an API from the backend OpenAPI URL, then supply its name, context, version, and endpoint. Deploy it and generate a key before trying it through the API documentation interface. Requests then use the manager's URL, such as https://localhost:8243/sample/0.0.1/files, rather than calling http://api:8000 directly. In a hardened deployment, stop exposing the backend port so clients must use the manager's single entry point. section 4.6.4

A Missing Credentials response usually means that Generate Key was not selected before testing. Exploratory testing through the manager is useful initially, but settled APIs need more specialized tools for robust testing. This sandbox configuration is not persistent, so substantial API configuration should be recreated or stored elsewhere. section 4.6.5 section 4.6.4

  wso2:
    build: 
      context: ./wso2
      dockerfile: Dockerfile  
    ports:
      - 9443:9443 # Management Console
      - 8243:8243 # HTTPS Requests
      - 8280:8280 # HTTP Requests

Use the Docker Compose service definition as a quick reference for building WSO2 and exposing its management, HTTPS, and HTTP ports. section 4.6.2

How Build Financial Software with Generative AI (From Scratch) covers it

How deep it goes
Demonstrates Docker integration, API creation, deployment, gateway requests, temporary credentials, and troubleshooting, but not persistent configuration.
Examples
Uses a Docker Compose deployment and routes a backend OpenAPI service through a versioned WSO2 gateway endpoint.
What it assumes
Assumes a running API with an OpenAPI URL and Docker setup, while introducing API management capabilities and gateway workflows.
What you can do after
Operate/configure a Dockerized WSO2 sandbox, publish an OpenAPI endpoint, deploy it, generate test credentials, and diagnose missing credentials.
How it connects
Connects API versioning, OpenAPI, authentication, authorization, rate limiting, analytics, monetization, and lifecycle management.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Financial Software with Generative AI (From Scratch). The section links point to the parts of the book it draws on.