The CloudMock admin API runs on port 4599 by default (CLOUDMOCK_ADMIN_PORT). All endpoints return JSON unless otherwise noted.
Base URL: http://localhost:4599
| Method | Path | Description |
|---|
GET | /api/health | Health check with per-service status and dataplane connectivity |
GET | /api/version | Build version, commit SHA, and build time |
GET | /api/config | Current active configuration |
GET | /api/stats | Aggregate request statistics |
Returns the health status of every registered service and the overall system status.
curl http://localhost:4599/api/health
curl http://localhost:4599/api/version
"build_time": "2026-03-21T12:00:00Z"
| Method | Path | Description |
|---|
GET | /api/services | List all registered services with action counts and health |
GET | /api/services/{name} | Detail for a single service (actions, health, resource count) |
POST | /api/services/{name}/reset | Reset a single service’s in-memory state |
POST | /api/reset | Reset all services |
GET | /api/resources/{service} | List resources for a service (buckets, tables, queues, etc.) |
curl http://localhost:4599/api/services
{"name": "s3", "actions": 10, "healthy": true, "resources": 3},
{"name": "dynamodb", "actions": 12, "healthy": true, "resources": 5}
Resets all services to their initial state, deleting all resources.
curl -X POST http://localhost:4599/api/reset
{"reset": 5, "services": ["s3", "dynamodb", "sqs", "sns", "sts"]}
Reset a single service:
curl -X POST http://localhost:4599/api/services/s3/reset
| Method | Path | Description |
|---|
GET | /api/requests | List recent requests with filtering |
GET | /api/requests/{id} | Get a single request by ID |
POST | /api/requests/{id}/replay | Replay a captured request against the gateway |
GET | /api/stream | SSE stream of requests in real time |
GET | /api/explain/{requestId} | AI-ready context for a request |
Query parameters:
| Parameter | Description |
|---|
limit | Maximum number of results (default: 100) |
level | Request level filter: app, infra, or all |
service | Filter by AWS service name |
action | Filter by AWS action name |
status | Filter by HTTP status code |
min_latency_ms | Minimum latency in milliseconds |
max_latency_ms | Maximum latency in milliseconds |
caller_id | Filter by caller identity |
curl "http://localhost:4599/api/requests?service=s3&limit=10"
Server-Sent Events stream. Each event is a JSON object:
curl -N http://localhost:4599/api/stream
data: {"type":"request","data":{"id":"req-123","service":"s3","action":"PutObject","status_code":200,"latency_ms":2}}
Re-sends a captured request to the gateway:
curl -X POST http://localhost:4599/api/requests/req-123/replay
| Method | Path | Description |
|---|
GET | /api/traces | List recent traces |
GET | /api/traces/{id} | Get a single trace with spans and timeline |
GET | /api/traces/compare | Compare two traces or a trace against its baseline |
Query parameters:
| Parameter | Description |
|---|
service | Filter by root service |
error | Filter by error status (true / false) |
limit | Maximum number of results |
curl "http://localhost:4599/api/traces?service=s3&limit=20"
Query parameters:
| Parameter | Description |
|---|
a | First trace ID |
b | Second trace ID (omit if using baseline) |
baseline | Compare against route baseline (true / false) |
curl "http://localhost:4599/api/traces/compare?a=trace-123&b=trace-456"
| Method | Path | Description |
|---|
GET | /api/topology | Dynamic service topology graph (nodes and edges) |
GET | /api/topology/config | Get IaC-derived topology configuration |
PUT | /api/topology/config | Set IaC-derived topology configuration |
GET | /api/blast-radius | Compute blast radius for a node |
Returns the full topology graph:
curl http://localhost:4599/api/topology
{"id": "external:bff-service", "label": "BFF", "service": "bff", "type": "external", "group": "API"},
{"id": "svc:dynamodb", "label": "DynamoDB", "service": "dynamodb", "type": "aws-service", "group": "Database"}
{"source": "external:bff-service", "target": "svc:dynamodb", "type": "invoke"}
curl "http://localhost:4599/api/blast-radius?node=svc:dynamodb"
| Method | Path | Description |
|---|
GET | /api/metrics | Aggregate metrics (request count, error rate, latency percentiles) |
GET | /api/metrics/timeline | Time-series metrics for charting |
GET | /api/compare | Before/after comparison of latency and error rate |
curl http://localhost:4599/api/metrics
Query parameters:
| Parameter | Description |
|---|
service | Service to compare |
action | Action to compare |
curl "http://localhost:4599/api/compare?service=s3&action=PutObject"
| Method | Path | Description |
|---|
GET | /api/slo | Current SLO status: windows, health, alerts, rules |
PUT | /api/slo | Update SLO rules |
curl -X PUT http://localhost:4599/api/slo \
-H "Content-Type: application/json" \
{"service": "s3", "latency_p99_ms": 100, "error_rate_threshold": 0.01},
{"service": "dynamodb", "latency_p99_ms": 50, "error_rate_threshold": 0.005}
| Method | Path | Description |
|---|
GET | /api/deploys | List recent deploy events |
POST | /api/deploys | Record a deploy event |
curl -X POST http://localhost:4599/api/deploys \
-H "Content-Type: application/json" \
-d '{"service": "my-api", "version": "1.2.3", "deployed_at": "2026-03-21T12:00:00Z"}'
| Method | Path | Description |
|---|
GET | /api/incidents | List incidents |
GET | /api/incidents/{id} | Get a single incident |
GET | /api/incidents/{id}/report | Export incident report |
POST | /api/incidents/{id}/acknowledge | Acknowledge an incident |
POST | /api/incidents/{id}/resolve | Resolve an incident |
Query parameters:
| Parameter | Description |
|---|
status | Filter by status (active, acknowledged, resolved) |
severity | Filter by severity |
service | Filter by service |
limit | Maximum results |
Query parameters:
| Parameter | Description |
|---|
format | Export format: json, csv, or html |
curl "http://localhost:4599/api/incidents/inc-123/report?format=html" > report.html
| Method | Path | Description |
|---|
GET | /api/regressions | List regressions |
GET | /api/regressions/{id} | Get a single regression |
POST | /api/regressions/{id}/dismiss | Dismiss a regression |
Query parameters: service, deploy_id, severity, status, limit.
| Method | Path | Description |
|---|
GET | /api/cost | Estimated AWS cost breakdown from recent traffic |
GET | /api/cost/routes | Cost breakdown by route |
GET | /api/cost/tenants | Cost breakdown by tenant |
GET | /api/cost/trend | Cost trend over time |
curl http://localhost:4599/api/cost
Returns estimated AWS costs based on the pricing model applied to observed traffic patterns.
| Method | Path | Description |
|---|
GET | /api/tenants | List all observed tenants with request counts and error rates |
GET | /api/tenants?id=CALLER_ID | Detail for a specific tenant |
GET | /api/tenants/export | Export tenant report as CSV |
| Method | Path | Description |
|---|
GET | /api/profile/{service} | Capture a profile |
GET | /api/profiles | List captured profiles |
GET | /api/profiles/{id} | Get a profile by ID |
POST | /api/sourcemaps | Upload a source map for symbolication |
Query parameters:
| Parameter | Description |
|---|
type | Profile type: cpu, heap, or goroutine |
duration | Duration to profile (e.g., 30s) |
format | Output format: flamegraph or pprof |
curl "http://localhost:4599/api/profile/s3?type=cpu&duration=30s&format=flamegraph"
| Method | Path | Description |
|---|
GET | /api/chaos | List chaos rules and active status |
POST | /api/chaos | Create a chaos rule |
DELETE | /api/chaos | Disable all chaos rules |
PUT | /api/chaos/{id} | Update a chaos rule |
DELETE | /api/chaos/{id} | Delete a chaos rule |
curl -X POST http://localhost:4599/api/chaos \
-H "Content-Type: application/json" \
{"service": "dynamodb", "type": "latency", "value": 2000},
{"service": "s3", "action": "GetObject", "type": "error", "value": 500}
| Method | Path | Description |
|---|
POST | /api/shadow | Replay recent traffic against a target URL |
curl -X POST http://localhost:4599/api/shadow \
-H "Content-Type: application/json" \
-d '{"target": "http://staging:4566", "service": "s3", "limit": 100}'
| Method | Path | Description |
|---|
POST | /api/auth/login | Authenticate and receive a JWT |
POST | /api/auth/register | Register a new user (admin only) |
GET | /api/auth/me | Get the current authenticated user |
curl -X POST http://localhost:4599/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "admin@example.com", "password": "secret"}'
| Method | Path | Description |
|---|
GET | /api/users | List all users (admin only) |
PUT | /api/users/{id} | Update a user’s role (admin only) |
| Method | Path | Description |
|---|
GET | /api/audit | Query audit log |
Query parameters: actor, action, resource, limit.
| Method | Path | Description |
|---|
GET | /api/webhooks | List all webhook configurations |
POST | /api/webhooks | Create a webhook |
DELETE | /api/webhooks/{id} | Delete a webhook |
POST | /api/webhooks/{id}/test | Send a test payload to a webhook |
curl -X POST http://localhost:4599/api/webhooks \
-H "Content-Type: application/json" \
"url": "https://hooks.slack.com/services/...",
"events": ["incident.created", "regression.detected"],
| Method | Path | Description |
|---|
GET | /api/preferences?namespace=X | List all preferences in a namespace |
GET | /api/preferences?namespace=X&key=Y | Get a single preference value |
PUT | /api/preferences | Set a preference |
DELETE | /api/preferences?namespace=X&key=Y | Delete a preference |
| Method | Path | Description |
|---|
GET | /api/views | List saved query views |
POST | /api/views | Create a saved view |
DELETE | /api/views?id=VIEW_ID | Delete a saved view |
| Method | Path | Description |
|---|
POST | /api/iam/evaluate | Evaluate an IAM policy |
Test whether a principal would be allowed to perform an action:
curl -X POST http://localhost:4599/api/iam/evaluate \
-H "Content-Type: application/json" \
-d '{"principal": "arn:aws:iam::000000000000:user/ci-user", "action": "s3:PutObject", "resource": "arn:aws:s3:::my-bucket/*"}'
| Method | Path | Description |
|---|
GET | /api/ses/emails | List captured SES emails |
GET | /api/ses/emails/{id} | Get a single captured email |
| Method | Path | Description |
|---|
GET | /api/lambda/logs | Get Lambda execution logs |
GET | /api/lambda/logs/stream | SSE stream of Lambda logs |