openapi: 3.2.0 info: title: HiveMorph v0.1 Ops API description: 'Polymorphic agent runtime — single shape (Merchant), single supermodel (W2 MERCHANT). Three gates: NEED + YIELD + CLEAN-MONEY.' version: 0.1.0 tags: - name: ops paths: /v1/ops/health: get: tags: - ops summary: Ops Health description: 'Aggregate health of every registered endpoint prefix. Uses the OpsMetricsMiddleware ring buffer for p50/p95/error-rate. Also introspects app.routes for route_count per prefix.' operationId: ops_health_v1_ops_health_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Ops Health V1 Ops Health Get /v1/ops/revenue: get: tags: - ops summary: Ops Revenue description: 'Revenue snapshot: Square gross + USDC-Base treasury balance. Uses Square API if SQUARE_ACCESS_TOKEN is set; otherwise returns cached snapshot. Base RPC used for on-chain USDC balance; falls back to cached snapshot on failure.' operationId: ops_revenue_v1_ops_revenue_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Ops Revenue V1 Ops Revenue Get /v1/ops/calls: get: tags: - ops summary: Ops Calls description: 'Rolling per-endpoint call counts — top 20 by RPM from in-memory ring buffer (last 60 seconds).' operationId: ops_calls_v1_ops_calls_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Ops Calls V1 Ops Calls Get /v1/ops/deploys: get: tags: - ops summary: Ops Deploys description: Last deploy SHA + timestamp per service from /tmp/hive_ops/deploys.json. operationId: ops_deploys_v1_ops_deploys_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Ops Deploys V1 Ops Deploys Get /v1/ops/traffic: get: tags: - ops summary: Ops Traffic Public description: Public HUD snapshot — lean fields for the homepage tile. Cached 60s. operationId: ops_traffic_public_v1_ops_traffic_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Ops Traffic Public V1 Ops Traffic Get /v1/ops/full: get: tags: - ops summary: Ops Traffic Full description: Full operator view — every service, every repo, perimeter detail. Key-gated. operationId: ops_traffic_full_v1_ops_full_get parameters: - name: key in: query required: true schema: type: string description: ops key title: Key description: ops key responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Ops Traffic Full V1 Ops Full Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError