Quick Start Guide¶
Using Docker Compose (Recommended)¶
Prerequisites¶
A Docker-compatible container runtime such as:
- Docker Desktop (Windows / macOS)
- Rancher Desktop (Windows / macOS)
- Colima (macOS)
- Docker Engine + Compose plugin (Linux)
Ensure docker and docker compose commands are available.
# Download distribution.
wget https://github.com/wso2/api-platform/releases/download/gateway/v1.1.0/wso2apip-api-gateway-1.1.0.zip
# Unzip the downloaded distribution.
unzip wso2apip-api-gateway-1.1.0.zip
# Start the complete stack
cd wso2apip-api-gateway-1.1.0/
docker compose up -d
# Verify gateway controller admin endpoint is running
curl http://localhost:9094/api/admin/v0.9/health
# Deploy an API configuration
curl -X POST http://localhost:9090/api/management/v0.9/rest-apis \
-u admin:admin \
-H "Content-Type: application/yaml" \
--data-binary @- <<'EOF'
apiVersion: gateway.api-platform.wso2.com/v1alpha1
kind: RestApi
metadata:
name: reading-list-api-v1.0
spec:
displayName: Reading-List-API
version: v1.0
context: /reading-list/$version
upstream:
main:
url: https://apis.bijira.dev/samples/reading-list-api-service/v1.0
policies:
- name: set-headers
version: v1
params:
request:
headers:
- name: x-wso2-apip-gateway-version
value: v1.0.0
response:
headers:
- name: x-environment
value: development
operations:
- method: GET
path: /books
- method: POST
path: /books
- method: GET
path: /books/{id}
- method: PUT
path: /books/{id}
- method: DELETE
path: /books/{id}
EOF
# Test routing through the gateway
curl -i http://localhost:8080/reading-list/v1.0/books
curl -ik https://localhost:8443/reading-list/v1.0/books
Stopping the Gateway¶
When stopping the gateway, you have two options:
Option 1: Stop runtime, keep data (persisted APIs and configuration)
This stops the containers but preserves thecontroller-data volume. When you restart with docker compose up, all your API configurations will be restored.
Option 2: Complete shutdown with data cleanup (fresh start)
This stops containers and removes thecontroller-data volume. Next startup will be a clean slate with no persisted APIs or configuration.