REST API
Operations
POST /api/ops/{operation}
Authorization : Bearer <principal>:<token>
Content-Type : application/json
The body is the operation's arguments as raw JSON (no wrapper). Arguments are validated against a strict schema: unknown keys are rejected.
Any method other than POST returns 405 with Allow: POST.
Request and response bodies are each capped at 1 MiB .
Responses carry Cache-Control: no-store.
There is no idempotency header: idempotency is the idempotency_key argument of tx.execute .
There are no rate limits on MCP or REST operations themselves. Model-demo and backtest quotas are separate and default off.
HTTP statuses
Status Code When 200 — The operation ran. Check ok : operation failures are 200 with ok: false. 200 OPERATION_FAILEDThe operation threw. 400 INVALID_JSONBad JSON, bad Content-Length or empty body. 401 UNAUTHORIZEDMissing or wrong bearer. Includes WWW-Authenticate: Bearer. 403 DEPLOYMENT_PROFILE_DISABLEDREST is disabled in this deployment profile (for example free/QuickJS). 403 HOSTED_STATE_PRINCIPAL_SCOPE_DENIEDThe internal hosted-state credential was used for ordinary ops. 404 UNKNOWN_OPERATIONNo such operation. 405 — Not POST. 413 REQUEST_TOO_LARGEBody over 1 MiB. 500 RESPONSE_TOO_LARGEResult over 1 MiB. 503 KMS_CONFIGURATION_INVALIDKMS mode is misconfigured (checked before routing). 503 AP4M_RUNTIME_CONFIGURATION_INVALIDAP4M configuration is invalid (on ap4m.*).
Other routes
Route Auth Purpose GET /healthnone {"ok":true,"service":"harbor","health":"process","handoff_readiness":"not_evaluated"}ANY /mcpbearer MCP Streamable HTTP. GET /.well-known/http-message-signatures-directorynone Web Bot Auth key directory used by AP4M merchants (Mastercard ). 503 WBA_DIRECTORY_UNAVAILABLE if unconfigured. POST /hooks/quicknode/walletQuickNode HMAC Wallet webhook confirmations (QuickNode ). POST /hooks/quicknode/watchdogQuickNode HMAC Streams watchdog deliveries. /internal/pilot-state/v1/*dedicated bearer Hosted-state persistence for the Pilot app. Default off. /internal/demo-model/v1/*bearer Free-demo model quota. Default off.
Example: read, then quote
curl -s " $PILOT_URL /api/ops/analytics.marketSnapshot" \
-H "Authorization: Bearer $PILOT_API_KEY " -H "Content-Type: application/json" \
-d '{
"network": "testnet",
"pair": {
"base": { "currency": "XRP" },
"quote": { "currency": "524C555344000000000000000000000000000000",
"issuer": "rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV" }
},
"depth_limit": 50,
"sample_base_amounts": ["1", "10", "100"]
}'
Returns a source-labelled, validated-ledger pair snapshot: book, AMM, spread and executable-liquidity estimates for each sample size, with explicit units and freshness.