openapi: 3.1.0
info:
  title: PlatPhorm Monitor API
  version: 0.4.0
  description: Canonical operations control plane for PlatPhormNews infrastructure, deployments, domains, DNS, firewall/security, sandbox, AI/model operations, trace/observability, API/MCP health, protected actions, rate limits, audit events, and cross-site reliability.
servers:
  - url: https://monitor.platphormnews.com
paths:
  /api/health:
    get:
      summary: Public Monitor health summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/health:
    get:
      summary: Standard v1 health summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/system-health:
    get:
      summary: System health, cache, rate-limit, request dedup, provider credential status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/settings/status:
    get:
      summary: Server-side settings truth model without raw env values
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/dashboard:
    get:
      summary: Public-safe database and Vercel API dashboard summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/database/status:
    get:
      summary: Canonical Postgres and optional DynamoDB status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/ja4db/status:
    get:
      summary: JA4DB integration status without secrets
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/sync-runs:
    get:
      summary: Database-backed sync run history
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/protected-actions:
    get:
      summary: Protected action queue
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/audit:
    get:
      summary: Public-safe audit event summaries
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/projects:
    get:
      summary: Public-safe monitored Vercel project summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/deployments:
    get:
      summary: Public-safe deployment summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/domains:
    get:
      summary: Public-safe domain summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/analytics:
    get:
      summary: Analytics status; degraded unless a real analytics source is configured
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/firewall:
    get:
      summary: Public-safe firewall status by project
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/notifications:
    get:
      summary: Public-safe notification list
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/incidents:
    get:
      summary: Incident list and protected incident creation
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/network/route-compliance:
    get:
      summary: Live standard route compliance check
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/network/uptime:
    get:
      summary: Latest live uptime check
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/cache/status:
    get:
      summary: Cache status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/rate-limit/status:
    get:
      summary: Rate limit and request dedup status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/sandbox/status:
    get:
      summary: Sandbox monitoring summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/sandbox/sandboxes:
    get:
      summary: Sandbox inventory or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/sandbox/commands:
    get:
      summary: Sandbox command summary or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/ai/status:
    get:
      summary: AI/model operations provider status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/ai/providers:
    get:
      summary: AI provider configuration status without secrets
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/observability/status:
    get:
      summary: Trace/observability integration status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/security/firewall:
    get:
      summary: Firewall/security summary
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/security/redaction:
    get:
      summary: Secret and x-vercel-ja4-digest redaction policy
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/network/status:
    get:
      summary: PlatPhormNews network monitor status
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/network/integrations:
    get:
      summary: Public-safe integration matrix
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/mcp:
    get:
      summary: MCP JSON-RPC 2.0 endpoint
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/projects:
    get:
      summary: Read Projects from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/deployments:
    get:
      summary: Read Deployments from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/domains:
    get:
      summary: Read Domains from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/dns/{domain}:
    get:
      summary: Read DNS Records from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/aliases:
    get:
      summary: Read Aliases from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/access-groups:
    get:
      summary: Read Access Groups from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/teams:
    get:
      summary: Read Teams from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/team-members:
    get:
      summary: Read Team Members from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/project-members/{projectId}:
    get:
      summary: Read Project Members from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/env/{projectId}:
    get:
      summary: Read Environment Metadata from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/webhooks:
    get:
      summary: Read Webhooks from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/edge-config:
    get:
      summary: Read Edge Config from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/feature-flags:
    get:
      summary: Read Feature Flags from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/firewall/{projectId}:
    get:
      summary: Read Firewall and Security from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/checks/{projectId}:
    get:
      summary: Read Checks from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/logs:
    get:
      summary: Read Logs from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/drains:
    get:
      summary: Read Drains from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/certs:
    get:
      summary: Read Certificates from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/artifacts/status:
    get:
      summary: Read Artifacts from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/sandboxes:
    get:
      summary: Read Sandboxes from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/rolling-release/{projectId}:
    get:
      summary: Read Rolling Releases from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/registrar/tlds:
    get:
      summary: Read Domains Registrar from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/api-observability:
    get:
      summary: Read API Observability from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/integrations:
    get:
      summary: Read Integrations from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/marketplace:
    get:
      summary: Read Marketplace from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/microfrontends:
    get:
      summary: Read Microfrontends from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/networking:
    get:
      summary: Read Networking from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/project-routes/{projectId}:
    get:
      summary: Read Project Routes from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api/v1/vercel/user:
    get:
      summary: Read User from live Vercel API or honest degraded state
      responses:
        '200':
          description: Standard PlatPhorm response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  securitySchemes:
    PlatPhormApiKey:
      type: apiKey
      in: header
      name: X-PlatPhorm-API-Key
    PlatPhormBearer:
      type: http
      scheme: bearer
  schemas:
    ApiResponse:
      oneOf:
        - type: object
          required: [ok, data]
          properties:
            ok:
              const: true
            data:
              type: object
        - type: object
          required: [ok, error]
          properties:
            ok:
              const: false
            error:
              type: object
              required: [code, message]
              properties:
                code:
                  type: string
                message:
                  type: string
                details:
                  type: object
