Skip to content
Pilot

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

StatusCodeWhen
200—The operation ran. Check ok: operation failures are 200 with ok: false.
200OPERATION_FAILEDThe operation threw.
400INVALID_JSONBad JSON, bad Content-Length or empty body.
401UNAUTHORIZEDMissing or wrong bearer. Includes WWW-Authenticate: Bearer.
403DEPLOYMENT_PROFILE_DISABLEDREST is disabled in this deployment profile (for example free/QuickJS).
403HOSTED_STATE_PRINCIPAL_SCOPE_DENIEDThe internal hosted-state credential was used for ordinary ops.
404UNKNOWN_OPERATIONNo such operation.
405—Not POST.
413REQUEST_TOO_LARGEBody over 1 MiB.
500RESPONSE_TOO_LARGEResult over 1 MiB.
503KMS_CONFIGURATION_INVALIDKMS mode is misconfigured (checked before routing).
503AP4M_RUNTIME_CONFIGURATION_INVALIDAP4M configuration is invalid (on ap4m.*).

Other routes

RouteAuthPurpose
GET /healthnone{"ok":true,"service":"harbor","health":"process","handoff_readiness":"not_evaluated"}
ANY /mcpbearerMCP Streamable HTTP.
GET /.well-known/http-message-signatures-directorynoneWeb Bot Auth key directory used by AP4M merchants (Mastercard). 503 WBA_DIRECTORY_UNAVAILABLE if unconfigured.
POST /hooks/quicknode/walletQuickNode HMACWallet webhook confirmations (QuickNode).
POST /hooks/quicknode/watchdogQuickNode HMACStreams watchdog deliveries.
/internal/pilot-state/v1/*dedicated bearerHosted-state persistence for the Pilot app. Default off.
/internal/demo-model/v1/*bearerFree-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.