Skip to content

Admin API

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


MethodPathDescription
GET/api/healthHealth check with per-service status and dataplane connectivity
GET/api/versionBuild version, commit SHA, and build time
GET/api/configCurrent active configuration
GET/api/statsAggregate request statistics

Returns the health status of every registered service and the overall system status.

Terminal window
curl http://localhost:4599/api/health
{
"status": "ok",
"services": {
"s3": true,
"dynamodb": true,
"sqs": true,
"sns": true,
"sts": true
}
}
Terminal window
curl http://localhost:4599/api/version
{
"version": "0.1.0",
"commit": "abc1234",
"build_time": "2026-03-21T12:00:00Z"
}

MethodPathDescription
GET/api/servicesList 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}/resetReset a single service’s in-memory state
POST/api/resetReset all services
GET/api/resources/{service}List resources for a service (buckets, tables, queues, etc.)
Terminal window
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.

Terminal window
curl -X POST http://localhost:4599/api/reset
{"reset": 5, "services": ["s3", "dynamodb", "sqs", "sns", "sts"]}

Reset a single service:

Terminal window
curl -X POST http://localhost:4599/api/services/s3/reset

MethodPathDescription
GET/api/requestsList recent requests with filtering
GET/api/requests/{id}Get a single request by ID
POST/api/requests/{id}/replayReplay a captured request against the gateway
GET/api/streamSSE stream of requests in real time
GET/api/explain/{requestId}AI-ready context for a request

Query parameters:

ParameterDescription
limitMaximum number of results (default: 100)
levelRequest level filter: app, infra, or all
serviceFilter by AWS service name
actionFilter by AWS action name
statusFilter by HTTP status code
min_latency_msMinimum latency in milliseconds
max_latency_msMaximum latency in milliseconds
caller_idFilter by caller identity
Terminal window
curl "http://localhost:4599/api/requests?service=s3&limit=10"

Server-Sent Events stream. Each event is a JSON object:

Terminal window
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:

Terminal window
curl -X POST http://localhost:4599/api/requests/req-123/replay

MethodPathDescription
GET/api/tracesList recent traces
GET/api/traces/{id}Get a single trace with spans and timeline
GET/api/traces/compareCompare two traces or a trace against its baseline

Query parameters:

ParameterDescription
serviceFilter by root service
errorFilter by error status (true / false)
limitMaximum number of results
Terminal window
curl "http://localhost:4599/api/traces?service=s3&limit=20"

Query parameters:

ParameterDescription
aFirst trace ID
bSecond trace ID (omit if using baseline)
baselineCompare against route baseline (true / false)
Terminal window
curl "http://localhost:4599/api/traces/compare?a=trace-123&b=trace-456"

MethodPathDescription
GET/api/topologyDynamic service topology graph (nodes and edges)
GET/api/topology/configGet IaC-derived topology configuration
PUT/api/topology/configSet IaC-derived topology configuration
GET/api/blast-radiusCompute blast radius for a node

Returns the full topology graph:

Terminal window
curl http://localhost:4599/api/topology
{
"nodes": [
{"id": "external:bff-service", "label": "BFF", "service": "bff", "type": "external", "group": "API"},
{"id": "svc:dynamodb", "label": "DynamoDB", "service": "dynamodb", "type": "aws-service", "group": "Database"}
],
"edges": [
{"source": "external:bff-service", "target": "svc:dynamodb", "type": "invoke"}
]
}
Terminal window
curl "http://localhost:4599/api/blast-radius?node=svc:dynamodb"

MethodPathDescription
GET/api/metricsAggregate metrics (request count, error rate, latency percentiles)
GET/api/metrics/timelineTime-series metrics for charting
GET/api/compareBefore/after comparison of latency and error rate
Terminal window
curl http://localhost:4599/api/metrics

Query parameters:

ParameterDescription
serviceService to compare
actionAction to compare
Terminal window
curl "http://localhost:4599/api/compare?service=s3&action=PutObject"

MethodPathDescription
GET/api/sloCurrent SLO status: windows, health, alerts, rules
PUT/api/sloUpdate SLO rules
Terminal window
curl -X PUT http://localhost:4599/api/slo \
-H "Content-Type: application/json" \
-d '[
{"service": "s3", "latency_p99_ms": 100, "error_rate_threshold": 0.01},
{"service": "dynamodb", "latency_p99_ms": 50, "error_rate_threshold": 0.005}
]'

MethodPathDescription
GET/api/deploysList recent deploy events
POST/api/deploysRecord a deploy event
Terminal window
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"}'

MethodPathDescription
GET/api/incidentsList incidents
GET/api/incidents/{id}Get a single incident
GET/api/incidents/{id}/reportExport incident report
POST/api/incidents/{id}/acknowledgeAcknowledge an incident
POST/api/incidents/{id}/resolveResolve an incident

Query parameters:

ParameterDescription
statusFilter by status (active, acknowledged, resolved)
severityFilter by severity
serviceFilter by service
limitMaximum results

Query parameters:

ParameterDescription
formatExport format: json, csv, or html
Terminal window
curl "http://localhost:4599/api/incidents/inc-123/report?format=html" > report.html

MethodPathDescription
GET/api/regressionsList regressions
GET/api/regressions/{id}Get a single regression
POST/api/regressions/{id}/dismissDismiss a regression

Query parameters: service, deploy_id, severity, status, limit.


MethodPathDescription
GET/api/costEstimated AWS cost breakdown from recent traffic
GET/api/cost/routesCost breakdown by route
GET/api/cost/tenantsCost breakdown by tenant
GET/api/cost/trendCost trend over time
Terminal window
curl http://localhost:4599/api/cost

Returns estimated AWS costs based on the pricing model applied to observed traffic patterns.


MethodPathDescription
GET/api/tenantsList all observed tenants with request counts and error rates
GET/api/tenants?id=CALLER_IDDetail for a specific tenant
GET/api/tenants/exportExport tenant report as CSV

MethodPathDescription
GET/api/profile/{service}Capture a profile
GET/api/profilesList captured profiles
GET/api/profiles/{id}Get a profile by ID
POST/api/sourcemapsUpload a source map for symbolication

Query parameters:

ParameterDescription
typeProfile type: cpu, heap, or goroutine
durationDuration to profile (e.g., 30s)
formatOutput format: flamegraph or pprof
Terminal window
curl "http://localhost:4599/api/profile/s3?type=cpu&duration=30s&format=flamegraph"

MethodPathDescription
GET/api/chaosList chaos rules and active status
POST/api/chaosCreate a chaos rule
DELETE/api/chaosDisable all chaos rules
PUT/api/chaos/{id}Update a chaos rule
DELETE/api/chaos/{id}Delete a chaos rule
Terminal window
curl -X POST http://localhost:4599/api/chaos \
-H "Content-Type: application/json" \
-d '{
"active": true,
"rules": [
{"service": "dynamodb", "type": "latency", "value": 2000},
{"service": "s3", "action": "GetObject", "type": "error", "value": 500}
]
}'

MethodPathDescription
POST/api/shadowReplay recent traffic against a target URL
Terminal window
curl -X POST http://localhost:4599/api/shadow \
-H "Content-Type: application/json" \
-d '{"target": "http://staging:4566", "service": "s3", "limit": 100}'

MethodPathDescription
POST/api/auth/loginAuthenticate and receive a JWT
POST/api/auth/registerRegister a new user (admin only)
GET/api/auth/meGet the current authenticated user
Terminal window
curl -X POST http://localhost:4599/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "admin@example.com", "password": "secret"}'

MethodPathDescription
GET/api/usersList all users (admin only)
PUT/api/users/{id}Update a user’s role (admin only)

MethodPathDescription
GET/api/auditQuery audit log

Query parameters: actor, action, resource, limit.


MethodPathDescription
GET/api/webhooksList all webhook configurations
POST/api/webhooksCreate a webhook
DELETE/api/webhooks/{id}Delete a webhook
POST/api/webhooks/{id}/testSend a test payload to a webhook
Terminal window
curl -X POST http://localhost:4599/api/webhooks \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.slack.com/services/...",
"events": ["incident.created", "regression.detected"],
"active": true
}'

MethodPathDescription
GET/api/preferences?namespace=XList all preferences in a namespace
GET/api/preferences?namespace=X&key=YGet a single preference value
PUT/api/preferencesSet a preference
DELETE/api/preferences?namespace=X&key=YDelete a preference

MethodPathDescription
GET/api/viewsList saved query views
POST/api/viewsCreate a saved view
DELETE/api/views?id=VIEW_IDDelete a saved view

MethodPathDescription
POST/api/iam/evaluateEvaluate an IAM policy

Test whether a principal would be allowed to perform an action:

Terminal window
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/*"}'

MethodPathDescription
GET/api/ses/emailsList captured SES emails
GET/api/ses/emails/{id}Get a single captured email

MethodPathDescription
GET/api/lambda/logsGet Lambda execution logs
GET/api/lambda/logs/streamSSE stream of Lambda logs