{
  "openapi": "3.1.0",
  "info": {
    "title": "AppPortal agent BI HTTP API",
    "version": "v1",
    "description": "Protected reporting and dashboard HTTP operations called by the CLI, including opt-in structured query reads. appportal mcp remains a local stdio MCP server; these routes are not an HTTP MCP transport."
  },
  "servers": [
    {
      "url": "https://{apiHost}",
      "description": "Use your deployment's protected HTTP API origin, without a path. The configured MCP resource audience URI may include /mcp; it is a token audience, not a server base to prepend to these /mcp paths.",
      "variables": {
        "apiHost": {
          "default": "example.invalid",
          "description": "The actual protected API host for the configured deployment. The reserved example sends no real request."
        }
      }
    }
  ],
  "paths": {
    "/mcp/bi/catalog": {
      "get": {
        "summary": "Read the agent BI catalog",
        "description": "Closed six-measure catalog for this agent adapter. Product-only performance measures and templates are not silently added to this consumer. model=structured admits known schema-2 queries and definitions; it grants no extra app, plan or OAuth authority. Redacted filter labels cannot reconstruct execution input.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "structured"
            },
            "description": "Explicit schema-2 opt-in. Omit for the unchanged schema-1 consumer contract. List cursors are bound to this model selection."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BiQueryCatalog"
                    },
                    {
                      "$ref": "#/components/schemas/BiStructuredQueryCatalog"
                    }
                  ]
                },
                "example": {
                  "schemaVersion": "1",
                  "measures": [
                    {
                      "key": "active_users",
                      "name": "Active users",
                      "unit": "users",
                      "definition": "Distinct active subjects observed on sessions, events, logs, RUM or error reports in the window. Exact user IDs deduplicate across streams; anonymous device/installation activity already represented by an identified subject is excluded.",
                      "supportsGrouping": false
                    },
                    {
                      "key": "sessions",
                      "name": "Sessions",
                      "unit": "sessions",
                      "definition": "Sessions whose start timestamp is in the window.",
                      "supportsGrouping": true
                    },
                    {
                      "key": "crashed_sessions",
                      "name": "Crashed sessions",
                      "unit": "sessions",
                      "definition": "Sessions in the window marked as ending in a crash.",
                      "supportsGrouping": false
                    },
                    {
                      "key": "error_reports",
                      "name": "Error reports",
                      "unit": "reports",
                      "definition": "Handled-error and unhandled-crash occurrences timestamped in the window.",
                      "supportsGrouping": false
                    },
                    {
                      "key": "crash_free_sessions_pct",
                      "name": "Crash-free sessions",
                      "unit": "%",
                      "definition": "100 × (1 − crashed sessions / sessions); 100 for an empty population, matching Portal.",
                      "supportsGrouping": false
                    },
                    {
                      "key": "error_rate",
                      "name": "Reports per session",
                      "unit": "reports/session",
                      "definition": "Error reports divided by sessions; zero for an empty population, matching Portal.",
                      "supportsGrouping": false
                    }
                  ],
                  "dimensions": [
                    {
                      "key": "platform",
                      "name": "Platform"
                    },
                    {
                      "key": "osFamily",
                      "name": "Operating system"
                    },
                    {
                      "key": "osVersion",
                      "name": "OS version"
                    },
                    {
                      "key": "deviceModel",
                      "name": "Device model"
                    },
                    {
                      "key": "formFactor",
                      "name": "Form factor"
                    },
                    {
                      "key": "appVersion",
                      "name": "App version"
                    },
                    {
                      "key": "buildNumber",
                      "name": "Build number"
                    }
                  ],
                  "maximumRangeDays": 90,
                  "maximumGroups": 20,
                  "comparison": "previous",
                  "defaultDashboard": {
                    "schemaVersion": 1,
                    "rangeDays": 7,
                    "widgets": [
                      {
                        "widgetId": "sessions",
                        "title": "Sessions",
                        "query": {
                          "measure": "sessions",
                          "dimension": null,
                          "version": null,
                          "comparePrevious": false,
                          "limit": 10
                        },
                        "visualization": "kpi",
                        "columnSpan": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting."
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          }
        }
      }
    },
    "/mcp/bi/query": {
      "get": {
        "summary": "Query one bounded BI metric",
        "description": "Use a half-open explicit window no longer than 90 days. Group shares use the full matching-session population; omitted sessions and truncation are explicit. Provider failures are not zero data. Arbitrary SQL, expressions and personal-ID dimensions are unsupported.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Explicit offset timestamp, inclusive start."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Explicit offset timestamp, exclusive end; after from and at most 90 days later."
          },
          {
            "name": "measure",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "active_users",
                "sessions",
                "crashed_sessions",
                "error_reports",
                "crash_free_sessions_pct",
                "error_rate"
              ]
            },
            "description": "Choose a catalog measure. Product-only measures return 501 from this pinned adapter."
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only sessions supports grouping: platform, osFamily, osVersion, deviceModel, formFactor, appVersion or buildNumber. Grouping cannot combine with previous-period comparison."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "x-appportal-max-utf16-code-units": 128
            },
            "description": "Optional non-whitespace exact app-version filter; the runtime bound is 128 UTF-16 code units."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 10
            },
            "description": "Leading-group limit; omitted populations retain their full denominator."
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "previous"
              ]
            },
            "description": "Optional immediately preceding equal-duration window for ungrouped metrics."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentQuery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting."
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          },
          "501": {
            "description": "Unsupported measure or provider, captureComplete remains false. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          },
          "503": {
            "description": "Telemetry dependency unavailable, captureComplete remains false. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Execute a structured metric query",
        "description": "Read-only POST. Same current analytics authority and overview-read consent as GET; no dashboard-write consent, mutation confirmation or Idempotency-Key. Body contains no account, app, environment, platform or target authority. JSON is bounded to 65,536 bytes/depth 16; unknown and duplicate case-insensitive fields reject. Use catalog-supported combinations, literal paired event/property predicates, explicit-offset adjacent half-open windows of at most 90 days, and daily/weekly cohorts with at most 14 periods. Explicit series use UTC 5/15/60/1440-minute buckets and at most 512 intersected buckets; ordered funnels use 2–8 event steps and a 1–720-hour conversion deadline; coarse geography preserves located/unknown counts with at most 300 countries and 12 cities. Generic rows remain limit-bounded (1–20), independently of those typed payloads. Unavailable values are null, never fabricated zero. Distinct grouped users/sessions are not additive; stacked charts are limited to compatible disjoint additive counts. Current and previous aggregates are separate live reads. The nested query chooses one supported measure and its narrowing predicates; it cannot execute arbitrary SQL or a new provider.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentStructuredQuery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting."
          },
          "413": {
            "description": "The request exceeds the bounded JSON body limit. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "415": {
            "description": "Send application/json. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest"
              }
            }
          }
        },
        "x-appportal-read-only": true,
        "x-appportal-max-request-body-bytes": 65536
      }
    },
    "/mcp/bi/dashboards": {
      "get": {
        "summary": "List saved BI dashboards",
        "description": "Live summaries, not a frozen snapshot. Return the opaque cursor with the same subject, app/environment selection and limit; a changed scope or tampered cursor returns 400. model=structured admits known schema-2 queries and definitions; it grants no extra app, plan or OAuth authority. Redacted filter labels cannot reconstruct execution input.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor from the previous page."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            },
            "description": "Page size, unchanged when reusing a cursor."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "structured"
            },
            "description": "Explicit schema-2 opt-in. Omit for the unchanged schema-1 consumer contract. List cursors are bound to this model selection."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentDashboardPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          },
          "501": {
            "description": "Saved definition outside the selected BI vocabulary. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/bi/dashboards/{dashboardId}": {
      "get": {
        "summary": "Read one saved BI dashboard",
        "description": "Read the protected definition and exact opaque version before querying a widget. Hidden resources return 404. Unsupported saved schemas return 409; definitions outside the pinned agent vocabulary return 501 without changing the board. model=structured admits known schema-2 queries and definitions; it grants no extra app, plan or OAuth authority. Redacted filter labels cannot reconstruct execution input.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "dashboardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "structured"
            },
            "description": "Explicit schema-2 opt-in. Omit for the unchanged schema-1 consumer contract. List cursors are bound to this model selection."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "ETag": {
                "description": "Quoted opaque dashboard revision. dashboardVersion and expectedVersion use the unquoted resource version.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentDashboard"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          },
          "501": {
            "description": "Saved definition outside the selected BI vocabulary. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/bi/dashboards/{dashboardId}/widgets/{widgetId}/query": {
      "get": {
        "summary": "Query one saved dashboard widget",
        "description": "Execute only the selected widget at the loaded dashboard revision. The saved definition supplies measure, dimension, version filter, group limit and comparison; caller query parameters cannot override them. One call executes one widget, without automatic fan-out.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Explicit offset timestamp, inclusive start."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Explicit offset timestamp, exclusive end; after from and at most 90 days later."
          },
          {
            "name": "dashboardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "widgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dashboardVersion",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Exact opaque version from the loaded dashboard, without ETag quotes. Missing/stale versions return 409."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentQuery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          },
          "501": {
            "description": "Unsupported measure or provider, captureComplete remains false. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          },
          "503": {
            "description": "Telemetry dependency unavailable, captureComplete remains false. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Query one stored structured widget",
        "description": "Read-only POST. Same current analytics authority and overview-read consent as GET; no dashboard-write consent, mutation confirmation or Idempotency-Key. Body contains no account, app, environment, platform or target authority. JSON is bounded to 65,536 bytes/depth 16; unknown and duplicate case-insensitive fields reject. Use catalog-supported combinations, literal paired event/property predicates, explicit-offset adjacent half-open windows of at most 90 days, and daily/weekly cohorts with at most 14 periods. Explicit series use UTC 5/15/60/1440-minute buckets and at most 512 intersected buckets; ordered funnels use 2–8 event steps and a 1–720-hour conversion deadline; coarse geography preserves located/unknown counts with at most 300 countries and 12 cities. Generic rows remain limit-bounded (1–20), independently of those typed payloads. Unavailable values are null, never fabricated zero. Distinct grouped users/sessions are not additive; stacked charts are limited to compatible disjoint additive counts. Current and previous aggregates are separate live reads. The body contains only execution timestamps and the exact DashboardVersion from structured discovery; stored predicates cannot be overridden. A changed revision or lost authority rejects the response.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "dashboardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "widgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentStructuredQuery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the bounded JSON body limit. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "415": {
            "description": "Send application/json. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BiSavedWidgetQueryRequest"
              }
            }
          }
        },
        "x-appportal-read-only": true,
        "x-appportal-max-request-body-bytes": 65536
      }
    },
    "/mcp/bi/dashboards/preview": {
      "post": {
        "summary": "Preview one dashboard intent",
        "description": "Preview create, update, delete or authenticated share without saving the dashboard. Create supplies a dashboard and no existing ID/revision. Update supplies the ID, exact expectedVersion and full replacement. Delete/share supply ID/revision and no dashboard. Review protected current/proposed values, but retain the original request for apply. A prior committed intent returns already_applied and its original result, without another confirmation. Omitting model preserves the schema-1 legacy contract; model=structured explicitly admits supported schema-2 definitions. Structured mode uses the same current grants, source authority, confirmation and idempotency protocol. Model selection is bound into the protected intent; proof or receipt reuse cannot retarget it. Nested event/location labels are privacy-projected without replacing the original caller intent.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read",
          "mcp:dashboards.write"
        ],
        "x-appportal-max-request-body-bytes": 81920,
        "x-appportal-mutation-validation": "Strict Web JSON, maximum depth 24; unknown and duplicate names (case-insensitive) are rejected. Known names bind case-insensitively. Omitting model retains schema-1/six-measure compatibility. Explicit model=structured admits supported schema-2 definitions; schema-1 requests still reject typed fields. Definitions retain 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“90 range days and 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“12 unique widgets; name/title at most 100 UTF-16 code units, widget IDs at most 64 ASCII letters/digits/_/-, column span 1 or 2. Visualization must match query shape: kpi, table, bar, cohort, heatmap, stacked, time-series, funnel or geo. Stacks require disjoint additive counts, never distinct users/sessions, ratios or percentiles. These domain rules are distinct from DTO JSON binding.",
        "x-appportal-current-authority": "Explicit overview+dashboard-write consent, current Admin/AppOwner, ViewAnalytics, active membership/app and portfolio-dashboards+MCP entitlements. A proof grants no authority. Sharing is a sign-in-required read-only bookmark requiring existing analytics access; no Free BI, membership grant or public embedding.",
        "x-appportal-confirmation-max-lifetime-seconds": 600,
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Stable 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“200 UTF-16 code units, no control characters or surrounding whitespace. Reuse across preview, apply, retries and reconciliation."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "structured"
            },
            "description": "Explicit structured-mutation opt-in. Omit for the unchanged legacy contract. Keep the same model, body bytes, key and resource revision across preview/apply and reconciliation."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpBiMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BiAgentPreviewReady"
                    },
                    {
                      "$ref": "#/components/schemas/BiAgentPreviewReconciled"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "413": {
            "description": "The JSON body exceeds 81,920 bytes; no action applied."
          },
          "415": {
            "description": "The request content type is not JSON."
          },
          "423": {
            "description": "Current organization operational policy denies management."
          },
          "429": {
            "description": "The shared connection action rate is exhausted or its policy changed during admission; no new dashboard mutation committed."
          },
          "501": {
            "description": "Definition uses a measure outside the pinned adapter vocabulary; no confirmation or change created. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/bi/dashboards/apply": {
      "post": {
        "summary": "Apply the confirmed dashboard intent",
        "description": "Apply the original request, protected confirmation token and exact expiresAt with the same Idempotency-Key. Proofs bind actor/connection, selection, action, payload and resource revision; current write consent, role and authority are checked again after waits. The shared connection policy narrows new work with server-derived one-dashboard impact, rate admission and an optional authenticated Portal humanApprovalReference; completed receipts do not consume another approval or admission. Reconcile an uncertain outcome with the same intent, never a fresh key. Omitting model preserves the schema-1 legacy contract; model=structured explicitly admits supported schema-2 definitions. Structured mode uses the same current grants, source authority, confirmation and idempotency protocol. Model selection is bound into the protected intent; proof or receipt reuse cannot retarget it. Nested event/location labels are privacy-projected without replacing the original caller intent.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read",
          "mcp:dashboards.write"
        ],
        "x-appportal-max-request-body-bytes": 81920,
        "x-appportal-mutation-validation": "Strict Web JSON, maximum depth 24; unknown and duplicate names (case-insensitive) are rejected. Known names bind case-insensitively. Omitting model retains schema-1/six-measure compatibility. Explicit model=structured admits supported schema-2 definitions; schema-1 requests still reject typed fields. Definitions retain 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“90 range days and 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“12 unique widgets; name/title at most 100 UTF-16 code units, widget IDs at most 64 ASCII letters/digits/_/-, column span 1 or 2. Visualization must match query shape: kpi, table, bar, cohort, heatmap, stacked, time-series, funnel or geo. Stacks require disjoint additive counts, never distinct users/sessions, ratios or percentiles. These domain rules are distinct from DTO JSON binding.",
        "x-appportal-current-authority": "Explicit overview+dashboard-write consent, current Admin/AppOwner, ViewAnalytics, active membership/app and portfolio-dashboards+MCP entitlements. A proof grants no authority. Sharing is a sign-in-required read-only bookmark requiring existing analytics access; no Free BI, membership grant or public embedding.",
        "x-appportal-confirmation-max-lifetime-seconds": 600,
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Stable 1ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“200 UTF-16 code units, no control characters or surrounding whitespace. Reuse across preview, apply, retries and reconciliation."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "structured"
            },
            "description": "Explicit structured-mutation opt-in. Omit for the unchanged legacy contract. Keep the same model, body bytes, key and resource revision across preview/apply and reconciliation."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpBiMutationApplyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Idempotency-Replayed": {
                "description": "Present as true when returning the original committed outcome.",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiDashboardMutationReply"
                }
              }
            }
          },
          "201": {
            "description": "Created dashboard or replay of the original create outcome.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Idempotency-Replayed": {
                "description": "Present as true when returning the original committed outcome.",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiDashboardMutationReply"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "413": {
            "description": "The JSON body exceeds 81,920 bytes; no action applied."
          },
          "415": {
            "description": "The request content type is not JSON."
          },
          "423": {
            "description": "Current organization operational policy denies management."
          },
          "429": {
            "description": "The shared connection action rate is exhausted or its policy changed during admission; no new dashboard mutation committed."
          },
          "501": {
            "description": "Definition uses a measure outside the pinned adapter vocabulary; no confirmation or change created. Request application/problem+json for a numeric HTTP status and support trace.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string"
                },
                "description": "Includes Accept."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentUnavailable"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentIncompleteProblem"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/reports/schedules": {
      "get": {
        "summary": "Page report-schedule configuration metadata",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Live, authority-filtered keyset pages are not a snapshot or a total-count promise. Follow a returned cursor with exactly the same selectors and page size; do not infer completeness from one page.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Unchanged page size across continuation requests."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            },
            "description": "Opaque 30-minute cursor, bound to connection, actor, selection and page size. An empty filtered page with a continuation is not an empty collection or complete list."
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportSchedulePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        }
      }
    },
    "/mcp/reports/schedules/{scheduleId}": {
      "get": {
        "summary": "Read report-schedule configuration metadata",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Live, authority-filtered keyset pages are not a snapshot or a total-count promise. Follow a returned cursor with exactly the same selectors and page size; do not infer completeness from one page.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportScheduleSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        }
      }
    },
    "/mcp/reports/schedules/preview": {
      "post": {
        "summary": "Preview a report-schedule intent",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Writes require current Admin/AppOwner and both explicitly consented report scopes. The existing report read/write consent requires empty deliveryChannels and grants no generation, delivery or artifact-body authority. Nonempty self subscriptions additionally require optional mcp:reports.generate and mcp:reports.delivery.write plus fresh ManageSchedules and source/recipient access; only authenticated links are eligible, no offline attachments. Runtime flags stay off by default. State changes require exact expectedVersion and the originating connection. Preview is audited and non-mutating. Confirmation binds action, original request digest/key, actor, originating connection and concrete selection; maximum lifetime 300 seconds.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Exact original intent key; no controls or surrounding whitespace. Keep the same body bytes and key for preview/apply and explicit uncertain-outcome reconciliation."
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write"
        ],
        "responses": {
          "200": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportSchedulePreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "x-appportal-mutation-validation": "Strict Web JSON object, depth at most24, unknown names and case-insensitive duplicates rejected; known names bind case-sensitively. Required constructor members must be present. Numeric-string binding follows Web serializer behavior; domain validation is additional. Schedule kinds: release, weekly-health, executive-summary, saved-query. Formats: markdown, pdf, csv, json; lookback1-90; sections1-12; title up to160. querySchemaVersion omitted/null selects legacy1; explicit2 uses the current structured query catalog and bounded typed payloads. Unknown versions fail closed. Series lookback must fit at most512 buckets. Daily/weekly recurrence, HH:mm, UTC or IANA zone; weekly day0-6, daily day absent/null. Saved-query pins its source ID/version and schema. Delivery channels are empty under legacy consent; explicit optional generation+delivery consent admits only email/message-center self subscriptions with current permission checks. expectedVersion must be positive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportScheduleRequest"
              }
            }
          }
        }
      }
    },
    "/mcp/reports/schedules/apply": {
      "post": {
        "summary": "Apply the confirmed report-schedule intent",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Writes require current Admin/AppOwner and both explicitly consented report scopes. The existing report read/write consent requires empty deliveryChannels and grants no generation, delivery or artifact-body authority. Nonempty self subscriptions additionally require optional mcp:reports.generate and mcp:reports.delivery.write plus fresh ManageSchedules and source/recipient access; only authenticated links are eligible, no offline attachments. Runtime flags stay off by default. State changes require exact expectedVersion and the originating connection. Apply unchanged intent and opaque proof. Fresh authority is rechecked before durable receipt replay; an original committed receipt can be recovered after proof expiry. A new expired proof cannot create a mutation. No automatic retry or new intent after an uncertain outcome.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Exact original intent key; no controls or surrounding whitespace. Keep the same body bytes and key for preview/apply and explicit uncertain-outcome reconciliation."
          },
          {
            "name": "X-AppPortal-MCP-Human-Approval",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            },
            "description": "Browser-issued approval bound to the exact protected report preview when required by the current connection policy."
          },
          {
            "name": "X-AppPortal-MCP-Confirmation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Opaque confirmationToken from the matching preview. Do not substitute a Product confirmation or locally reject an expired proof before explicit receipt recovery."
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write"
        ],
        "responses": {
          "201": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string",
                  "const": "true"
                },
                "description": "Present when the original committed result is recovered after current authority checks."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportScheduleSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "x-appportal-mutation-validation": "Strict Web JSON object, depth at most24, unknown names and case-insensitive duplicates rejected; known names bind case-sensitively. Required constructor members must be present. Numeric-string binding follows Web serializer behavior; domain validation is additional. Schedule kinds: release, weekly-health, executive-summary, saved-query. Formats: markdown, pdf, csv, json; lookback1-90; sections1-12; title up to160. querySchemaVersion omitted/null selects legacy1; explicit2 uses the current structured query catalog and bounded typed payloads. Unknown versions fail closed. Series lookback must fit at most512 buckets. Daily/weekly recurrence, HH:mm, UTC or IANA zone; weekly day0-6, daily day absent/null. Saved-query pins its source ID/version and schema. Delivery channels are empty under legacy consent; explicit optional generation+delivery consent admits only email/message-center self subscriptions with current permission checks. expectedVersion must be positive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportScheduleRequest"
              }
            }
          }
        }
      }
    },
    "/mcp/reports/schedules/{scheduleId}/state/preview": {
      "post": {
        "summary": "Preview a report-schedule intent",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Writes require current Admin/AppOwner and both explicitly consented report scopes. The existing report read/write consent requires empty deliveryChannels and grants no generation, delivery or artifact-body authority. Nonempty self subscriptions additionally require optional mcp:reports.generate and mcp:reports.delivery.write plus fresh ManageSchedules and source/recipient access; only authenticated links are eligible, no offline attachments. Runtime flags stay off by default. State changes require exact expectedVersion and the originating connection. Preview is audited and non-mutating. Confirmation binds action, original request digest/key, actor, originating connection and concrete selection; maximum lifetime 300 seconds.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Exact original intent key; no controls or surrounding whitespace. Keep the same body bytes and key for preview/apply and explicit uncertain-outcome reconciliation."
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write"
        ],
        "responses": {
          "200": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportScheduleStatePreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "x-appportal-mutation-validation": "Strict Web JSON object, depth at most24, unknown names and case-insensitive duplicates rejected; known names bind case-sensitively. Required constructor members must be present. Numeric-string binding follows Web serializer behavior; domain validation is additional. Schedule kinds: release, weekly-health, executive-summary, saved-query. Formats: markdown, pdf, csv, json; lookback1-90; sections1-12; title up to160. querySchemaVersion omitted/null selects legacy1; explicit2 uses the current structured query catalog and bounded typed payloads. Unknown versions fail closed. Series lookback must fit at most512 buckets. Daily/weekly recurrence, HH:mm, UTC or IANA zone; weekly day0-6, daily day absent/null. Saved-query pins its source ID/version and schema. Delivery channels are empty under legacy consent; explicit optional generation+delivery consent admits only email/message-center self subscriptions with current permission checks. expectedVersion must be positive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeProductReportScheduleRequest"
              }
            }
          }
        }
      }
    },
    "/mcp/reports/schedules/{scheduleId}/state/apply": {
      "post": {
        "summary": "Apply the confirmed report-schedule intent",
        "description": "OAuth-only configuration, separate from Product browser reporting. Current membership, ViewAnalytics, organization/app/environment access and effective BI/MCP plan entitlements are required. Summaries omit titles, query definitions, recipients, origins and artifacts. Writes require current Admin/AppOwner and both explicitly consented report scopes. The existing report read/write consent requires empty deliveryChannels and grants no generation, delivery or artifact-body authority. Nonempty self subscriptions additionally require optional mcp:reports.generate and mcp:reports.delivery.write plus fresh ManageSchedules and source/recipient access; only authenticated links are eligible, no offline attachments. Runtime flags stay off by default. State changes require exact expectedVersion and the originating connection. Apply unchanged intent and opaque proof. Fresh authority is rechecked before durable receipt replay; an original committed receipt can be recovered after proof expiry. A new expired proof cannot create a mutation. No automatic retry or new intent after an uncertain outcome.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Exact original intent key; no controls or surrounding whitespace. Keep the same body bytes and key for preview/apply and explicit uncertain-outcome reconciliation."
          },
          {
            "name": "X-AppPortal-MCP-Human-Approval",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            },
            "description": "Browser-issued approval bound to the exact protected report preview when required by the current connection policy."
          },
          {
            "name": "X-AppPortal-MCP-Confirmation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Opaque confirmationToken from the matching preview. Do not substitute a Product confirmation or locally reject an expired proof before explicit receipt recovery."
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write"
        ],
        "responses": {
          "200": {
            "description": "Authorized configuration result; no report dispatch or artifact body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string",
                  "const": "true"
                },
                "description": "Present when the original committed result is recovered after current authority checks."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportScheduleSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "x-appportal-mutation-validation": "Strict Web JSON object, depth at most24, unknown names and case-insensitive duplicates rejected; known names bind case-sensitively. Required constructor members must be present. Numeric-string binding follows Web serializer behavior; domain validation is additional. Schedule kinds: release, weekly-health, executive-summary, saved-query. Formats: markdown, pdf, csv, json; lookback1-90; sections1-12; title up to160. querySchemaVersion omitted/null selects legacy1; explicit2 uses the current structured query catalog and bounded typed payloads. Unknown versions fail closed. Series lookback must fit at most512 buckets. Daily/weekly recurrence, HH:mm, UTC or IANA zone; weekly day0-6, daily day absent/null. Saved-query pins its source ID/version and schema. Delivery channels are empty under legacy consent; explicit optional generation+delivery consent admits only email/message-center self subscriptions with current permission checks. expectedVersion must be positive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeProductReportScheduleRequest"
              }
            }
          }
        }
      }
    },
    "/mcp/reports/jobs": {
      "get": {
        "summary": "list",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Unchanged page size."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            },
            "description": "Opaque actor/connection/selector/limit-bound continuation; filtered pages do not imply totals."
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized metadata only, without titles, definitions or contents.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportJobPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read"
        ]
      }
    },
    "/mcp/reports/jobs/{jobId}": {
      "get": {
        "summary": "get",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized metadata only, without titles, definitions or contents.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportJobSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read"
        ]
      }
    },
    "/mcp/reports/jobs/preview": {
      "post": {
        "summary": "generate-preview",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Stable original body/key; never replace automatically after uncertainty."
          }
        ],
        "responses": {
          "200": {
            "description": "Reviewed report intent or current immutable job metadata; no delivery activation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportGenerationPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write",
          "mcp:reports.generate"
        ],
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpGenerateReportRequest"
              }
            }
          }
        },
        "x-appportal-conditional-oauth-scope": "allowOfflineSnapshot=true additionally requires mcp:reports.export and current export authority; policy and job intent commit atomically."
      }
    },
    "/mcp/reports/jobs/apply": {
      "post": {
        "summary": "generate-apply",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Stable original body/key; never replace automatically after uncertainty."
          },
          {
            "name": "X-AppPortal-MCP-Human-Approval",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            },
            "description": "Browser-issued approval bound to the exact protected report preview when required by the current connection policy."
          },
          {
            "name": "X-AppPortal-MCP-Confirmation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Exact reviewed preview proof; current authority remains mandatory before original receipt recovery."
          }
        ],
        "responses": {
          "202": {
            "description": "Reviewed report intent or current immutable job metadata; no delivery activation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string",
                  "const": "true"
                },
                "description": "Original intent was reconciled under current authority; export still requires fresh proof."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportJobSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.write",
          "mcp:reports.generate"
        ],
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpGenerateReportRequest"
              }
            }
          }
        },
        "x-appportal-conditional-oauth-scope": "allowOfflineSnapshot=true additionally requires mcp:reports.export and current export authority; policy and job intent commit atomically."
      }
    },
    "/mcp/reports/jobs/{jobId}/artifact/preview": {
      "post": {
        "summary": "export-preview",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Stable original body/key; never replace automatically after uncertainty."
          }
        ],
        "responses": {
          "200": {
            "description": "Reviewed report intent or current immutable job metadata; no delivery activation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportArtifactPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.export"
        ],
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpExportReportRequest"
              }
            }
          }
        }
      }
    },
    "/mcp/reports/jobs/{jobId}/artifact/apply": {
      "post": {
        "summary": "export-apply",
        "description": "Optional OAuth report family. Current connection grants, actor, source authority, selector and report permissions are rechecked; preview policy revision, impact/rate and browser approval are enforced by the current shared action policy; no creator/admin sharing bypass. Metadata excludes private definitions. Generation executes one confirmed immutable job, with no scheduler activation. Export requires explicit allowOfflineSnapshot=true, exact version/SHA, persisted offline authorization and current Export permission. Only MCP-redacted artifacts with current presentation-policy fingerprint can be disclosed; legacy/raw or policy-stale artifacts fail closed. Artifacts expire after seven days, decoded bytes at most2000000; export JSON/base64 envelope at most3000000. Resource URI is an appportal identifier, never a bearer URL or filesystem path. Actual decoded retained bytes and actual wire bytes are journaled separately. No delivery activation or real sends.",
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Stable original body/key; never replace automatically after uncertainty."
          },
          {
            "name": "X-AppPortal-MCP-Human-Approval",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            },
            "description": "Browser-issued approval bound to the exact protected report preview when required by the current connection policy."
          },
          {
            "name": "X-AppPortal-MCP-Confirmation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Exact matching five-minute artifact proof; freshness is required even on replay."
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized immutable MCP-redacted offline resource envelope; decoded2MB/wire3MB bounds and actual response-byte accounting.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string",
                  "const": "true"
                },
                "description": "Original intent was reconciled under current authority; export still requires fresh proof."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReportArtifactExport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid/ambiguous body, selectors or protected cursor; not an empty result."
          },
          "401": {
            "description": "Missing/expired/wrong-audience OAuth credential; framework failures can be bodyless."
          },
          "403": {
            "description": "Current report consent, role, capability, owner or authority denies access."
          },
          "404": {
            "description": "Hidden, inactive, inaccessible or wrong-origin resource."
          },
          "409": {
            "description": "report_confirmation_invalid, report_idempotency_conflict or report_version_conflict: reconcile the original intent or reload; no overwrite."
          },
          "413": {
            "description": "report_body_too_large; maximum65536 bytes."
          },
          "415": {
            "description": "report_media_type_invalid; JSON required."
          },
          "429": {
            "description": "Existing MCP request/report budget exhausted; honor Retry-After when supplied."
          },
          "503": {
            "description": "report_delivery_unavailable or report_dependency_unavailable/report_source_unavailable; unavailable is not success."
          }
        },
        "x-appportal-required-oauth-scopes": [
          "mcp:reports.read",
          "mcp:reports.export"
        ],
        "x-appportal-max-request-body-bytes": 65536,
        "x-appportal-confirmation-max-lifetime-seconds": 300,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpExportReportRequest"
              }
            }
          }
        },
        "x-appportal-max-response-body-bytes": 3000000
      }
    },
    "/mcp/bi/ask": {
      "post": {
        "summary": "Ask one bounded English analytics question",
        "description": "Read-only POST. The single ask tool translates the documented closed English grammar into the actual provider aggregate query; no caller query object, SQL/KQL, AI provider call or new consent is accepted. Examples: How many sessions in the last 7 days? Show sessions by platform in the last 7 days. Show crash-free sessions in the last 7 days compared with the previous period. Measures: sessions, active users, crashed sessions, error reports, crash-free sessions, reports per session. Groups: platform, operating system, OS version, device model, form factor, app version, build number; only sessions can group, without previous comparison. Use 1–30 days, including the equal-length preceding comparison inside current effective pinned offering/account retention. An exact moving retention-boundary window may need narrowing. Unsupported, causal, ambiguous, injected or free-form asks clarify without provider reads. No general-model or BYOM capability is implied. Fifteen-second cooperative deadline, up to four logical aggregate calls and twenty groups. Physical scan cost and currency are unknown. GeneratedQuery is the executed appportal-aggregate-v1 semantic plan, never SQL/KQL or private organization/storage selectors. ChartSpec is a reusable widget definition; Result carries its sanitized data. Only retained observations are queried; captureComplete is always false. Preserve unavailable counts/rates, nullable denominators, full populations and omitted groups. Current/previous reads are not atomic. FollowupToken is encrypted with the persistent host keyring, actor/connection/all selector bound, ten-minute fixed lifetime and at most ten refinements. Followups: by platform; compare with the previous period; last 14 days. Current OAuth grant, app/team rights, entitlement and retention are rechecked. Questions are not persisted or audited; audit contains fixed action/outcome/count only. No schedules, writes, exports or sends. Saving a chart still requires separate authorized preview/apply.",
        "parameters": [
          {
            "name": "X-AppPortal-AppId",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select an authorized app."
          },
          {
            "name": "X-AppPortal-Environment",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Select one concrete authorized environment."
          },
          {
            "name": "X-AppPortal-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Portfolio connections select an authorized organization; this header grants no access."
          },
          {
            "name": "X-AppPortal-Platform",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to an authorized platform."
          },
          {
            "name": "X-AppPortal-DeploymentTarget",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to a valid deployment target."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional existing scope selector, constrained by current authority. Select an app and concrete environment using supported headers/query values."
          }
        ],
        "security": [
          {
            "mcpBearer": []
          }
        ],
        "x-appportal-required-oauth-scopes": [
          "mcp:overview.read"
        ],
        "responses": {
          "200": {
            "description": "Authorized protected result.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              },
              "X-AppPortal-Diagnostic-Classification": {
                "schema": {
                  "type": "string",
                  "const": "sanitized"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAskResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, ambiguous, unknown or repeated selector/body values. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "401": {
            "description": "Missing/expired authentication or wrong token audience."
          },
          "403": {
            "description": "Current consent, capability or role does not authorize this request."
          },
          "404": {
            "description": "Resource hidden, inactive or inaccessible, or BI/MCP entitlement unavailable."
          },
          "409": {
            "description": "Unsupported saved schema, changed selection/revision, reused conflicting intent, or expired/mismatched confirmation; reload/reconcile instead of overwriting. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "413": {
            "description": "The bounded JSON request is too large. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "415": {
            "description": "Send application/json. Endpoint validation supports application/problem+json. Earlier authorization or scope failures may retain their native response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BiAgentProblem"
                }
              }
            }
          },
          "429": {
            "description": "Request budget exceeded. Respect Retry-After when supplied; no automatic query fan-out."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BiAskRequest"
              }
            }
          }
        },
        "x-appportal-read-only": true,
        "x-appportal-max-request-body-bytes": 65536
      }
    }
  },
  "components": {
    "schemas": {
      "BiQueryCatalog": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "measures": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "definition": {
                  "type": "string"
                },
                "supportsGrouping": {
                  "type": "boolean"
                }
              },
              "required": [
                "key",
                "name",
                "unit",
                "definition",
                "supportsGrouping"
              ]
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ]
            }
          },
          "maximumRangeDays": {
            "type": "integer"
          },
          "maximumGroups": {
            "type": "integer"
          },
          "comparison": {
            "type": "string"
          },
          "defaultDashboard": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "schemaVersion": {
                "type": "integer",
                "enum": [
                  1,
                  2
                ]
              },
              "rangeDays": {
                "type": "integer"
              },
              "widgets": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "widgetId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "measure": {
                          "type": "string"
                        },
                        "dimension": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "comparePrevious": {
                          "type": "boolean",
                          "default": false
                        },
                        "limit": {
                          "type": "integer",
                          "default": 10,
                          "minimum": 1,
                          "maximum": 20,
                          "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                        },
                        "filters": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "buildNumber": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventType": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyValue": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "buildId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "groupId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            }
                          },
                          "additionalProperties": false
                        },
                        "cohort": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "periodDays": {
                              "type": "integer",
                              "default": 1
                            },
                            "maximumPeriods": {
                              "type": "integer",
                              "default": 14
                            }
                          },
                          "additionalProperties": false
                        },
                        "series": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "bucketMinutes": {
                              "type": "integer",
                              "default": 60,
                              "enum": [
                                5,
                                15,
                                60,
                                1440
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "funnel": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "eventType": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "eventType",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2,
                              "maxItems": 8,
                              "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                            },
                            "conversionWindowHours": {
                              "type": "integer",
                              "default": 24,
                              "minimum": 1,
                              "maximum": 720
                            }
                          },
                          "required": [
                            "steps"
                          ],
                          "additionalProperties": false
                        },
                        "geography": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "measure"
                      ],
                      "additionalProperties": false
                    },
                    "visualization": {
                      "type": "string",
                      "default": "kpi",
                      "enum": [
                        "kpi",
                        "table",
                        "bar",
                        "cohort",
                        "heatmap",
                        "stacked",
                        "time-series",
                        "funnel",
                        "geo"
                      ],
                      "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
                    },
                    "columnSpan": {
                      "type": "integer",
                      "default": 1
                    }
                  },
                  "required": [
                    "widgetId",
                    "title",
                    "query"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schemaVersion",
              "rangeDays",
              "widgets"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "measures",
          "dimensions",
          "maximumRangeDays",
          "maximumGroups",
          "comparison"
        ]
      },
      "BiQueryResult": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "measure": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "definition": {
            "type": "string"
          },
          "dimension": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "current": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "value": {
                      "type": "number"
                    },
                    "denominator": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "default": null,
                      "description": "Metric-specific population from the source definition. Group share uses full matching sessions; rates preserve the session denominator. Null does not mean zero."
                    },
                    "percentage": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "key",
                    "value"
                  ]
                }
              },
              "populationSessions": {
                "type": "integer"
              },
              "distinctValues": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "omittedSessions": {
                "type": "integer"
              },
              "isTruncated": {
                "type": "boolean"
              }
            },
            "required": [
              "from",
              "to",
              "rows",
              "populationSessions",
              "distinctValues",
              "omittedSessions",
              "isTruncated"
            ],
            "description": "Live aggregate window [from,to). populationSessions is the full matching session population, including groups outside returned rows. omittedSessions and isTruncated preserve missing leading-group coverage. Distinct subject counts are observed identities, not proof of real people."
          },
          "previous": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "rows": {
                "$ref": "#/components/schemas/BiQueryResult/properties/current/properties/rows"
              },
              "populationSessions": {
                "type": "integer"
              },
              "distinctValues": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "omittedSessions": {
                "type": "integer"
              },
              "isTruncated": {
                "type": "boolean"
              }
            },
            "required": [
              "from",
              "to",
              "rows",
              "populationSessions",
              "distinctValues",
              "omittedSessions",
              "isTruncated"
            ]
          }
        },
        "required": [
          "schemaVersion",
          "appId",
          "environment",
          "measure",
          "unit",
          "definition",
          "dimension",
          "version",
          "observedAt",
          "current",
          "previous"
        ]
      },
      "BiDashboardResource": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "dashboardId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "integer",
                "enum": [
                  1,
                  2
                ]
              },
              "rangeDays": {
                "type": "integer"
              },
              "widgets": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "widgetId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "measure": {
                          "type": "string"
                        },
                        "dimension": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "comparePrevious": {
                          "type": "boolean",
                          "default": false
                        },
                        "limit": {
                          "type": "integer",
                          "default": 10,
                          "minimum": 1,
                          "maximum": 20,
                          "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                        },
                        "filters": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "buildNumber": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventType": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyValue": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "buildId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "groupId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            }
                          },
                          "additionalProperties": false
                        },
                        "cohort": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "periodDays": {
                              "type": "integer",
                              "default": 1
                            },
                            "maximumPeriods": {
                              "type": "integer",
                              "default": 14
                            }
                          },
                          "additionalProperties": false
                        },
                        "series": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "bucketMinutes": {
                              "type": "integer",
                              "default": 60,
                              "enum": [
                                5,
                                15,
                                60,
                                1440
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "funnel": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "eventType": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "eventType",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2,
                              "maxItems": 8,
                              "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                            },
                            "conversionWindowHours": {
                              "type": "integer",
                              "default": 24,
                              "minimum": 1,
                              "maximum": 720
                            }
                          },
                          "required": [
                            "steps"
                          ],
                          "additionalProperties": false
                        },
                        "geography": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "measure"
                      ],
                      "additionalProperties": false
                    },
                    "visualization": {
                      "type": "string",
                      "default": "kpi",
                      "enum": [
                        "kpi",
                        "table",
                        "bar",
                        "cohort",
                        "heatmap",
                        "stacked",
                        "time-series",
                        "funnel",
                        "geo"
                      ],
                      "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
                    },
                    "columnSpan": {
                      "type": "integer",
                      "default": 1
                    }
                  },
                  "required": [
                    "widgetId",
                    "title",
                    "query"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schemaVersion",
              "rangeDays",
              "widgets"
            ],
            "additionalProperties": false
          },
          "version": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dashboardId",
          "appId",
          "name",
          "definition",
          "version",
          "createdAt",
          "updatedAt"
        ]
      },
      "BiDashboardMutationReply": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "dashboardId": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "appliedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dashboardPath": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "action",
          "appId",
          "dashboardId",
          "version",
          "appliedAt"
        ]
      },
      "McpBiMutationRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": [
              "string",
              "null"
            ]
          },
          "dashboardId": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "expectedVersion": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "dashboard": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "definition": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "schemaVersion": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "x-appportal-decoded-integer-enum": [
                      1,
                      2
                    ]
                  },
                  "rangeDays": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "widgets": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "widgetId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "query": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "measure": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "dimension": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "version": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "comparePrevious": {
                              "type": "boolean",
                              "default": false
                            },
                            "limit": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 10,
                              "minimum": 1,
                              "maximum": 20,
                              "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                            },
                            "filters": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "buildNumber": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "eventType": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "eventName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "propertyName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "propertyValue": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "buildId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "groupId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                }
                              },
                              "additionalProperties": false,
                              "patternProperties": {
                                "^[bB][uU][iI][lL][dD][nN][uU][mM][bB][eE][rR]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/buildNumber"
                                },
                                "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/eventType"
                                },
                                "^[eE][vV][eE][nN][tT][nN][aA][mM][eE]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/eventName"
                                },
                                "^[pP][rR][oO][pP][eE][rR][tT][yY][nN][aA][mM][eE]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/propertyName"
                                },
                                "^[pP][rR][oO][pP][eE][rR][tT][yY][vV][aA][lL][uU][eE]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/propertyValue"
                                },
                                "^[bB][uU][iI][lL][dD][iI][dD]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/buildId"
                                },
                                "^[gG][rR][oO][uU][pP][iI][dD]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/groupId"
                                }
                              }
                            },
                            "cohort": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "periodDays": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 1
                                },
                                "maximumPeriods": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 14
                                }
                              },
                              "additionalProperties": false,
                              "patternProperties": {
                                "^[pP][eE][rR][iI][oO][dD][dD][aA][yY][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort/properties/periodDays"
                                },
                                "^[mM][aA][xX][iI][mM][uU][mM][pP][eE][rR][iI][oO][dD][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort/properties/maximumPeriods"
                                }
                              }
                            },
                            "series": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "bucketMinutes": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 60,
                                  "x-appportal-decoded-integer-enum": [
                                    5,
                                    15,
                                    60,
                                    1440
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "patternProperties": {
                                "^[bB][uU][cC][kK][eE][tT][mM][iI][nN][uU][tT][eE][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/series/properties/bucketMinutes"
                                }
                              }
                            },
                            "funnel": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "steps": {
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "items": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "eventType": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false,
                                    "patternProperties": {
                                      "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                                        "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps/items/properties/eventType"
                                      },
                                      "^[nN][aA][mM][eE]$": {
                                        "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps/items/properties/name"
                                      }
                                    }
                                  },
                                  "minItems": 2,
                                  "maxItems": 8,
                                  "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                                },
                                "conversionWindowHours": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 24,
                                  "minimum": 1,
                                  "maximum": 720
                                }
                              },
                              "additionalProperties": false,
                              "patternProperties": {
                                "^[sS][tT][eE][pP][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps"
                                },
                                "^[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN][wW][iI][nN][dD][oO][wW][hH][oO][uU][rR][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/conversionWindowHours"
                                }
                              }
                            },
                            "geography": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false,
                          "patternProperties": {
                            "^[mM][eE][aA][sS][uU][rR][eE]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/measure"
                            },
                            "^[dD][iI][mM][eE][nN][sS][iI][oO][nN]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/dimension"
                            },
                            "^[vV][eE][rR][sS][iI][oO][nN]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/version"
                            },
                            "^[cC][oO][mM][pP][aA][rR][eE][pP][rR][eE][vV][iI][oO][uU][sS]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/comparePrevious"
                            },
                            "^[lL][iI][mM][iI][tT]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/limit"
                            },
                            "^[fF][iI][lL][tT][eE][rR][sS]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters"
                            },
                            "^[cC][oO][hH][oO][rR][tT]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort"
                            },
                            "^[sS][eE][rR][iI][eE][sS]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/series"
                            },
                            "^[fF][uU][nN][nN][eE][lL]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel"
                            },
                            "^[gG][eE][oO][gG][rR][aA][pP][hH][yY]$": {
                              "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/geography"
                            }
                          }
                        },
                        "visualization": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": "kpi",
                          "enum": [
                            "kpi",
                            "table",
                            "bar",
                            "cohort",
                            "heatmap",
                            "stacked",
                            "time-series",
                            "funnel",
                            "geo"
                          ],
                          "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
                        },
                        "columnSpan": {
                          "type": [
                            "string",
                            "integer"
                          ],
                          "pattern": "^-?(?:0|[1-9]\\d*)$",
                          "default": 1
                        }
                      },
                      "additionalProperties": false,
                      "patternProperties": {
                        "^[wW][iI][dD][gG][eE][tT][iI][dD]$": {
                          "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/widgetId"
                        },
                        "^[tT][iI][tT][lL][eE]$": {
                          "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/title"
                        },
                        "^[qQ][uU][eE][rR][yY]$": {
                          "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/query"
                        },
                        "^[vV][iI][sS][uU][aA][lL][iI][zZ][aA][tT][iI][oO][nN]$": {
                          "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/visualization"
                        },
                        "^[cC][oO][lL][uU][mM][nN][sS][pP][aA][nN]$": {
                          "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets/items/properties/columnSpan"
                        }
                      }
                    }
                  }
                },
                "additionalProperties": false,
                "patternProperties": {
                  "^[sS][cC][hH][eE][mM][aA][vV][eE][rR][sS][iI][oO][nN]$": {
                    "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/schemaVersion"
                  },
                  "^[rR][aA][nN][gG][eE][dD][aA][yY][sS]$": {
                    "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/rangeDays"
                  },
                  "^[wW][iI][dD][gG][eE][tT][sS]$": {
                    "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition/properties/widgets"
                  }
                }
              }
            },
            "additionalProperties": false,
            "default": null,
            "patternProperties": {
              "^[nN][aA][mM][eE]$": {
                "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/name"
              },
              "^[dD][eE][fF][iI][nN][iI][tT][iI][oO][nN]$": {
                "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard/properties/definition"
              }
            }
          }
        },
        "additionalProperties": false,
        "patternProperties": {
          "^[aA][cC][tT][iI][oO][nN]$": {
            "$ref": "#/components/schemas/McpBiMutationRequest/properties/action"
          },
          "^[dD][aA][sS][hH][bB][oO][aA][rR][dD][iI][dD]$": {
            "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboardId"
          },
          "^[eE][xX][pP][eE][cC][tT][eE][dD][vV][eE][rR][sS][iI][oO][nN]$": {
            "$ref": "#/components/schemas/McpBiMutationRequest/properties/expectedVersion"
          },
          "^[dD][aA][sS][hH][bB][oO][aA][rR][dD]$": {
            "$ref": "#/components/schemas/McpBiMutationRequest/properties/dashboard"
          }
        }
      },
      "McpBiMutationApplyRequest": {
        "type": "object",
        "properties": {
          "request": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "action": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dashboardId": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "expectedVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "dashboard": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "definition": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "schemaVersion": {
                        "type": [
                          "string",
                          "integer"
                        ],
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "x-appportal-decoded-integer-enum": [
                          1,
                          2
                        ]
                      },
                      "rangeDays": {
                        "type": [
                          "string",
                          "integer"
                        ],
                        "pattern": "^-?(?:0|[1-9]\\d*)$"
                      },
                      "widgets": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "widgetId": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "query": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "measure": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "dimension": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "version": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "comparePrevious": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "limit": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 10,
                                  "minimum": 1,
                                  "maximum": 20,
                                  "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                                },
                                "filters": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "buildNumber": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "eventType": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "eventName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "propertyName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "propertyValue": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "buildId": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    },
                                    "groupId": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "additionalProperties": false,
                                  "patternProperties": {
                                    "^[bB][uU][iI][lL][dD][nN][uU][mM][bB][eE][rR]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/buildNumber"
                                    },
                                    "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/eventType"
                                    },
                                    "^[eE][vV][eE][nN][tT][nN][aA][mM][eE]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/eventName"
                                    },
                                    "^[pP][rR][oO][pP][eE][rR][tT][yY][nN][aA][mM][eE]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/propertyName"
                                    },
                                    "^[pP][rR][oO][pP][eE][rR][tT][yY][vV][aA][lL][uU][eE]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/propertyValue"
                                    },
                                    "^[bB][uU][iI][lL][dD][iI][dD]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/buildId"
                                    },
                                    "^[gG][rR][oO][uU][pP][iI][dD]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters/properties/groupId"
                                    }
                                  }
                                },
                                "cohort": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "periodDays": {
                                      "type": [
                                        "string",
                                        "integer"
                                      ],
                                      "pattern": "^-?(?:0|[1-9]\\d*)$",
                                      "default": 1
                                    },
                                    "maximumPeriods": {
                                      "type": [
                                        "string",
                                        "integer"
                                      ],
                                      "pattern": "^-?(?:0|[1-9]\\d*)$",
                                      "default": 14
                                    }
                                  },
                                  "additionalProperties": false,
                                  "patternProperties": {
                                    "^[pP][eE][rR][iI][oO][dD][dD][aA][yY][sS]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort/properties/periodDays"
                                    },
                                    "^[mM][aA][xX][iI][mM][uU][mM][pP][eE][rR][iI][oO][dD][sS]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort/properties/maximumPeriods"
                                    }
                                  }
                                },
                                "series": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "bucketMinutes": {
                                      "type": [
                                        "string",
                                        "integer"
                                      ],
                                      "pattern": "^-?(?:0|[1-9]\\d*)$",
                                      "default": 60,
                                      "x-appportal-decoded-integer-enum": [
                                        5,
                                        15,
                                        60,
                                        1440
                                      ]
                                    }
                                  },
                                  "additionalProperties": false,
                                  "patternProperties": {
                                    "^[bB][uU][cC][kK][eE][tT][mM][iI][nN][uU][tT][eE][sS]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/series/properties/bucketMinutes"
                                    }
                                  }
                                },
                                "funnel": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "steps": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "eventType": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "name": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false,
                                        "patternProperties": {
                                          "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                                            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps/items/properties/eventType"
                                          },
                                          "^[nN][aA][mM][eE]$": {
                                            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps/items/properties/name"
                                          }
                                        }
                                      },
                                      "minItems": 2,
                                      "maxItems": 8,
                                      "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                                    },
                                    "conversionWindowHours": {
                                      "type": [
                                        "string",
                                        "integer"
                                      ],
                                      "pattern": "^-?(?:0|[1-9]\\d*)$",
                                      "default": 24,
                                      "minimum": 1,
                                      "maximum": 720
                                    }
                                  },
                                  "additionalProperties": false,
                                  "patternProperties": {
                                    "^[sS][tT][eE][pP][sS]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/steps"
                                    },
                                    "^[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN][wW][iI][nN][dD][oO][wW][hH][oO][uU][rR][sS]$": {
                                      "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel/properties/conversionWindowHours"
                                    }
                                  }
                                },
                                "geography": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "additionalProperties": false,
                              "patternProperties": {
                                "^[mM][eE][aA][sS][uU][rR][eE]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/measure"
                                },
                                "^[dD][iI][mM][eE][nN][sS][iI][oO][nN]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/dimension"
                                },
                                "^[vV][eE][rR][sS][iI][oO][nN]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/version"
                                },
                                "^[cC][oO][mM][pP][aA][rR][eE][pP][rR][eE][vV][iI][oO][uU][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/comparePrevious"
                                },
                                "^[lL][iI][mM][iI][tT]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/limit"
                                },
                                "^[fF][iI][lL][tT][eE][rR][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/filters"
                                },
                                "^[cC][oO][hH][oO][rR][tT]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/cohort"
                                },
                                "^[sS][eE][rR][iI][eE][sS]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/series"
                                },
                                "^[fF][uU][nN][nN][eE][lL]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/funnel"
                                },
                                "^[gG][eE][oO][gG][rR][aA][pP][hH][yY]$": {
                                  "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query/properties/geography"
                                }
                              }
                            },
                            "visualization": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": "kpi",
                              "enum": [
                                "kpi",
                                "table",
                                "bar",
                                "cohort",
                                "heatmap",
                                "stacked",
                                "time-series",
                                "funnel",
                                "geo"
                              ],
                              "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
                            },
                            "columnSpan": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 1
                            }
                          },
                          "additionalProperties": false,
                          "patternProperties": {
                            "^[wW][iI][dD][gG][eE][tT][iI][dD]$": {
                              "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/widgetId"
                            },
                            "^[tT][iI][tT][lL][eE]$": {
                              "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/title"
                            },
                            "^[qQ][uU][eE][rR][yY]$": {
                              "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/query"
                            },
                            "^[vV][iI][sS][uU][aA][lL][iI][zZ][aA][tT][iI][oO][nN]$": {
                              "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/visualization"
                            },
                            "^[cC][oO][lL][uU][mM][nN][sS][pP][aA][nN]$": {
                              "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets/items/properties/columnSpan"
                            }
                          }
                        }
                      }
                    },
                    "additionalProperties": false,
                    "patternProperties": {
                      "^[sS][cC][hH][eE][mM][aA][vV][eE][rR][sS][iI][oO][nN]$": {
                        "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/schemaVersion"
                      },
                      "^[rR][aA][nN][gG][eE][dD][aA][yY][sS]$": {
                        "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/rangeDays"
                      },
                      "^[wW][iI][dD][gG][eE][tT][sS]$": {
                        "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition/properties/widgets"
                      }
                    }
                  }
                },
                "additionalProperties": false,
                "default": null,
                "patternProperties": {
                  "^[nN][aA][mM][eE]$": {
                    "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/name"
                  },
                  "^[dD][eE][fF][iI][nN][iI][tT][iI][oO][nN]$": {
                    "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard/properties/definition"
                  }
                }
              }
            },
            "additionalProperties": false,
            "patternProperties": {
              "^[aA][cC][tT][iI][oO][nN]$": {
                "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/action"
              },
              "^[dD][aA][sS][hH][bB][oO][aA][rR][dD][iI][dD]$": {
                "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboardId"
              },
              "^[eE][xX][pP][eE][cC][tT][eE][dD][vV][eE][rR][sS][iI][oO][nN]$": {
                "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/expectedVersion"
              },
              "^[dD][aA][sS][hH][bB][oO][aA][rR][dD]$": {
                "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request/properties/dashboard"
              }
            }
          },
          "confirmationToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "humanApprovalReference": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "maxLength": 16384,
            "description": "Optional opaque reference from authenticated Portal action review when the connection policy requires human confirmation. Bound to the exact preview, caller key, resource revision, current authority and policy revision."
          }
        },
        "additionalProperties": false,
        "patternProperties": {
          "^[rR][eE][qQ][uU][eE][sS][tT]$": {
            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/request"
          },
          "^[cC][oO][nN][fF][iI][rR][mM][aA][tT][iI][oO][nN][tT][oO][kK][eE][nN]$": {
            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/confirmationToken"
          },
          "^[eE][xX][pP][iI][rR][eE][sS][aA][tT]$": {
            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/expiresAt"
          },
          "^[hH][uU][mM][aA][nN][aA][pP][pP][rR][oO][vV][aA][lL][rR][eE][fF][eE][rR][eE][nN][cC][eE]$": {
            "$ref": "#/components/schemas/McpBiMutationApplyRequest/properties/humanApprovalReference"
          }
        }
      },
      "BiAgentQuery": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "available"
          },
          "captureComplete": {
            "const": false
          },
          "result": {
            "$ref": "#/components/schemas/BiQueryResult"
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "contentTruncated": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "captureComplete",
          "result",
          "contentRedacted",
          "contentTruncated"
        ],
        "additionalProperties": false
      },
      "BiAgentUnavailable": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "unsupported",
              "unavailable"
            ]
          },
          "captureComplete": {
            "const": false
          },
          "unavailableReason": {
            "enum": [
              "unsupported_provider",
              "dependency_unavailable",
              "unsupported_measure"
            ]
          }
        },
        "required": [
          "status",
          "captureComplete",
          "unavailableReason"
        ],
        "additionalProperties": false
      },
      "BiAgentProblem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "message",
          "error",
          "traceId"
        ],
        "additionalProperties": false
      },
      "BiAgentIncompleteProblem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "sourceStatus": {
            "enum": [
              "unsupported",
              "unavailable"
            ]
          },
          "captureComplete": {
            "const": false
          },
          "unavailableReason": {
            "enum": [
              "unsupported_provider",
              "dependency_unavailable",
              "unsupported_measure"
            ]
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "message",
          "error",
          "traceId",
          "sourceStatus",
          "captureComplete",
          "unavailableReason"
        ],
        "additionalProperties": false
      },
      "BiAgentDashboardSummary": {
        "type": "object",
        "properties": {
          "dashboardId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "schemaVersion": {
            "type": "integer"
          },
          "rangeDays": {
            "type": "integer"
          },
          "widgetCount": {
            "type": "integer"
          }
        },
        "required": [
          "dashboardId",
          "appId",
          "name",
          "version",
          "createdAt",
          "updatedAt",
          "schemaVersion",
          "rangeDays",
          "widgetCount"
        ],
        "additionalProperties": false
      },
      "BiAgentDashboardPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BiAgentDashboardSummary"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "contentTruncated": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "nextCursor",
          "contentRedacted",
          "contentTruncated"
        ],
        "additionalProperties": false
      },
      "BiAgentDashboard": {
        "type": "object",
        "properties": {
          "dashboard": {
            "$ref": "#/components/schemas/BiDashboardResource"
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "contentTruncated": {
            "type": "boolean"
          }
        },
        "required": [
          "dashboard",
          "contentRedacted",
          "contentTruncated"
        ],
        "additionalProperties": false
      },
      "BiAgentPreviewReady": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ready"
          },
          "action": {
            "type": "string"
          },
          "dashboardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currentVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "current": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BiDashboardRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "proposed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BiDashboardRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "contentTruncated": {
            "type": "boolean"
          },
          "confirmation": {
            "type": "object",
            "properties": {
              "token": {
                "type": "string"
              },
              "digest": {
                "type": "string"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "token",
              "digest",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "status",
          "action",
          "dashboardId",
          "currentVersion",
          "current",
          "proposed",
          "contentRedacted",
          "contentTruncated",
          "confirmation",
          "warnings"
        ],
        "additionalProperties": false
      },
      "BiAgentPreviewReconciled": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "already_applied"
          },
          "result": {
            "$ref": "#/components/schemas/BiDashboardMutationReply"
          },
          "confirmation": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "result",
          "confirmation"
        ],
        "additionalProperties": false
      },
      "BiDashboardRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "definition": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "integer",
                "enum": [
                  1,
                  2
                ]
              },
              "rangeDays": {
                "type": "integer"
              },
              "widgets": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "widgetId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "measure": {
                          "type": "string"
                        },
                        "dimension": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "comparePrevious": {
                          "type": "boolean",
                          "default": false
                        },
                        "limit": {
                          "type": "integer",
                          "default": 10,
                          "minimum": 1,
                          "maximum": 20,
                          "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                        },
                        "filters": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "buildNumber": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventType": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyValue": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "buildId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "groupId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            }
                          },
                          "additionalProperties": false
                        },
                        "cohort": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "periodDays": {
                              "type": "integer",
                              "default": 1
                            },
                            "maximumPeriods": {
                              "type": "integer",
                              "default": 14
                            }
                          },
                          "additionalProperties": false
                        },
                        "series": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "bucketMinutes": {
                              "type": "integer",
                              "default": 60,
                              "enum": [
                                5,
                                15,
                                60,
                                1440
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "funnel": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "eventType": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "eventType",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2,
                              "maxItems": 8,
                              "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                            },
                            "conversionWindowHours": {
                              "type": "integer",
                              "default": 24,
                              "minimum": 1,
                              "maximum": 720
                            }
                          },
                          "required": [
                            "steps"
                          ],
                          "additionalProperties": false
                        },
                        "geography": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "measure"
                      ],
                      "additionalProperties": false
                    },
                    "visualization": {
                      "type": "string",
                      "default": "kpi",
                      "enum": [
                        "kpi",
                        "table",
                        "bar",
                        "cohort",
                        "heatmap",
                        "stacked",
                        "time-series",
                        "funnel",
                        "geo"
                      ],
                      "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
                    },
                    "columnSpan": {
                      "type": "integer",
                      "default": 1
                    }
                  },
                  "required": [
                    "widgetId",
                    "title",
                    "query"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schemaVersion",
              "rangeDays",
              "widgets"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "name",
          "definition"
        ],
        "additionalProperties": false
      },
      "ReportScheduleRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "definition": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "selector": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "appId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "environment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "platform": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "deploymentTarget": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "buildNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "releaseId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  }
                },
                "required": [
                  "appId",
                  "environment"
                ],
                "additionalProperties": false
              },
              "queries": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "query": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "measure": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "dimension": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "version": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        },
                        "comparePrevious": {
                          "type": "boolean",
                          "default": false
                        },
                        "limit": {
                          "type": [
                            "string",
                            "integer"
                          ],
                          "pattern": "^-?(?:0|[1-9]\\d*)$",
                          "default": 10,
                          "minimum": 1,
                          "maximum": 20,
                          "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                        },
                        "filters": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "buildNumber": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventType": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "eventName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "propertyValue": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "buildId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "groupId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            }
                          },
                          "additionalProperties": false
                        },
                        "cohort": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "periodDays": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 1
                            },
                            "maximumPeriods": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 14
                            }
                          },
                          "additionalProperties": false
                        },
                        "series": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "bucketMinutes": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 60,
                              "x-appportal-decoded-integer-enum": [
                                5,
                                15,
                                60,
                                1440
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "funnel": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "eventType": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "eventType",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "minItems": 2,
                              "maxItems": 8,
                              "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                            },
                            "conversionWindowHours": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 24,
                              "minimum": 1,
                              "maximum": 720
                            }
                          },
                          "required": [
                            "steps"
                          ],
                          "additionalProperties": false
                        },
                        "geography": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "measure"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "title",
                    "query"
                  ],
                  "additionalProperties": false
                }
              },
              "savedSourceId": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "savedSourceVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "querySchemaVersion": {
                "type": [
                  "string",
                  "integer",
                  "null"
                ],
                "pattern": "^-?(?:0|[1-9]\\d*)$",
                "default": null,
                "x-appportal-decoded-integer-enum": [
                  1,
                  2,
                  null
                ],
                "description": "Omitted/null selects legacy query schema1, preserving legacy serialized definitions and hashes. Web numeric strings decode before domain validation. Decoded2 selects the bounded structured BI query contract, including supported filters/cohorts/typed charts. Decoded values other than1/2 are rejected; saved schema2 pins2."
              }
            },
            "required": [
              "kind",
              "title",
              "selector",
              "queries"
            ],
            "additionalProperties": false
          },
          "format": {
            "type": [
              "string",
              "null"
            ]
          },
          "lookbackDays": {
            "type": [
              "string",
              "integer"
            ],
            "pattern": "^-?(?:0|[1-9]\\d*)$"
          },
          "recurrence": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "frequency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timeZoneId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "localTime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dayOfWeek": {
                "type": [
                  "string",
                  "integer",
                  "null"
                ],
                "pattern": "^-?(?:0|[1-9]\\d*)$",
                "default": null
              }
            },
            "required": [
              "frequency",
              "timeZoneId",
              "localTime"
            ],
            "additionalProperties": false
          },
          "deliveryChannels": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "required": [
          "definition",
          "format",
          "lookbackDays",
          "recurrence",
          "deliveryChannels"
        ],
        "additionalProperties": false
      },
      "ChangeProductReportScheduleRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "expectedVersion": {
            "type": [
              "string",
              "integer"
            ],
            "pattern": "^-?(?:0|[1-9]\\d*)$"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "expectedVersion",
          "enabled"
        ],
        "additionalProperties": false
      },
      "McpReportScheduleSummary": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "scheduleId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "platform": {
            "type": [
              "string",
              "null"
            ]
          },
          "deploymentTarget": {
            "type": [
              "string",
              "null"
            ]
          },
          "lookbackDays": {
            "type": "integer"
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string"
              },
              "timeZoneId": {
                "type": "string"
              },
              "localTime": {
                "type": "string"
              },
              "dayOfWeek": {
                "type": [
                  "integer",
                  "null"
                ],
                "default": null
              }
            },
            "required": [
              "frequency",
              "timeZoneId",
              "localTime"
            ]
          },
          "sectionCount": {
            "type": "integer"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "nextOccurrenceUtc": {
            "type": "string",
            "format": "date-time"
          },
          "emailDeliveryAvailability": {
            "type": "string"
          },
          "messageCenterDeliveryAvailability": {
            "type": "string"
          }
        },
        "required": [
          "scheduleId",
          "version",
          "state",
          "kind",
          "format",
          "appId",
          "environment",
          "lookbackDays",
          "recurrence",
          "sectionCount",
          "createdAtUtc",
          "nextOccurrenceUtc",
          "emailDeliveryAvailability",
          "messageCenterDeliveryAvailability"
        ]
      },
      "McpReportSchedulePage": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "scheduleId": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer"
                },
                "state": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "appId": {
                  "type": "string"
                },
                "environment": {
                  "type": "string"
                },
                "platform": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "deploymentTarget": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lookbackDays": {
                  "type": "integer"
                },
                "recurrence": {
                  "type": "object",
                  "properties": {
                    "frequency": {
                      "type": "string"
                    },
                    "timeZoneId": {
                      "type": "string"
                    },
                    "localTime": {
                      "type": "string"
                    },
                    "dayOfWeek": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "frequency",
                    "timeZoneId",
                    "localTime"
                  ]
                },
                "sectionCount": {
                  "type": "integer"
                },
                "createdAtUtc": {
                  "type": "string",
                  "format": "date-time"
                },
                "nextOccurrenceUtc": {
                  "type": "string",
                  "format": "date-time"
                },
                "emailDeliveryAvailability": {
                  "type": "string"
                },
                "messageCenterDeliveryAvailability": {
                  "type": "string"
                }
              },
              "required": [
                "scheduleId",
                "version",
                "state",
                "kind",
                "format",
                "appId",
                "environment",
                "lookbackDays",
                "recurrence",
                "sectionCount",
                "createdAtUtc",
                "nextOccurrenceUtc",
                "emailDeliveryAvailability",
                "messageCenterDeliveryAvailability"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCount": {
            "type": "null",
            "description": "Unknown total, explicitly emitted as null; loaded pages are not a complete-count proof."
          }
        },
        "required": [
          "items",
          "nextCursor",
          "totalCount"
        ]
      },
      "ProductReportConfirmation": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "digest": {
            "type": "string"
          },
          "confirmationToken": {
            "type": "string"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "digest",
          "confirmationToken",
          "expiresAtUtc"
        ]
      },
      "ReportRecurrence": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "frequency": {
            "type": "string"
          },
          "timeZoneId": {
            "type": "string"
          },
          "localTime": {
            "type": "string"
          },
          "dayOfWeek": {
            "type": [
              "integer",
              "null"
            ],
            "default": null
          }
        },
        "required": [
          "frequency",
          "timeZoneId",
          "localTime"
        ]
      },
      "McpReportSchedulePreview": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ready"
          },
          "impact": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "format": {
                "type": "string"
              },
              "lookbackDays": {
                "type": "integer"
              },
              "recurrence": {
                "$ref": "#/components/schemas/ReportRecurrence"
              },
              "generationEnabled": {
                "type": "boolean"
              },
              "sectionCount": {
                "type": "integer"
              },
              "deliveryChannels": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 2
              }
            },
            "required": [
              "kind",
              "format",
              "lookbackDays",
              "recurrence",
              "generationEnabled",
              "sectionCount",
              "deliveryChannels"
            ],
            "additionalProperties": false
          },
          "confirmation": {
            "$ref": "#/components/schemas/ProductReportConfirmation"
          },
          "deliveryAvailability": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "const": "unavailable"
              },
              "messageCenter": {
                "type": "string",
                "const": "unavailable"
              }
            },
            "required": [
              "email",
              "messageCenter"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "impact",
          "confirmation",
          "deliveryAvailability"
        ],
        "additionalProperties": false
      },
      "McpReportScheduleStatePreview": {
        "type": "object",
        "properties": {
          "scheduleId": {
            "type": "string",
            "format": "uuid"
          },
          "expectedVersion": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "confirmation": {
            "$ref": "#/components/schemas/ProductReportConfirmation"
          }
        },
        "required": [
          "scheduleId",
          "expectedVersion",
          "enabled",
          "confirmation"
        ],
        "additionalProperties": false
      },
      "McpGenerateReportRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "report": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "definition": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "kind": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "selector": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "appId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "environment": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "platform": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "deploymentTarget": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "version": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "buildNumber": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "releaseId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "appId",
                      "environment"
                    ],
                    "additionalProperties": false
                  },
                  "queries": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "query": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "measure": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "dimension": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "version": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "default": null
                            },
                            "comparePrevious": {
                              "type": "boolean",
                              "default": false
                            },
                            "limit": {
                              "type": [
                                "string",
                                "integer"
                              ],
                              "pattern": "^-?(?:0|[1-9]\\d*)$",
                              "default": 10,
                              "minimum": 1,
                              "maximum": 20,
                              "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                            },
                            "filters": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "buildNumber": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "eventType": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "eventName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "propertyName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "propertyValue": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "buildId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                },
                                "groupId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "default": null
                                }
                              },
                              "additionalProperties": false
                            },
                            "cohort": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "periodDays": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 1
                                },
                                "maximumPeriods": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 14
                                }
                              },
                              "additionalProperties": false
                            },
                            "series": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "bucketMinutes": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 60,
                                  "x-appportal-decoded-integer-enum": [
                                    5,
                                    15,
                                    60,
                                    1440
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            "funnel": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "steps": {
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "items": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "eventType": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "eventType",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 2,
                                  "maxItems": 8,
                                  "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                                },
                                "conversionWindowHours": {
                                  "type": [
                                    "string",
                                    "integer"
                                  ],
                                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                                  "default": 24,
                                  "minimum": 1,
                                  "maximum": 720
                                }
                              },
                              "required": [
                                "steps"
                              ],
                              "additionalProperties": false
                            },
                            "geography": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "measure"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "title",
                        "query"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "savedSourceId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "savedSourceVersion": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "querySchemaVersion": {
                    "type": [
                      "string",
                      "integer",
                      "null"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "default": null,
                    "x-appportal-decoded-integer-enum": [
                      1,
                      2,
                      null
                    ],
                    "description": "Omitted/null selects legacy query schema1, preserving legacy serialized definitions and hashes. Web numeric strings decode before domain validation. Decoded2 selects the bounded structured BI query contract, including supported filters/cohorts/typed charts. Decoded values other than1/2 are rejected; saved schema2 pins2."
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "selector",
                  "queries"
                ],
                "additionalProperties": false
              },
              "fromUtc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "toUtc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "format": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "definition",
              "fromUtc",
              "toUtc",
              "format"
            ],
            "additionalProperties": false
          },
          "allowOfflineSnapshot": {
            "type": "boolean"
          }
        },
        "required": [
          "report",
          "allowOfflineSnapshot"
        ],
        "additionalProperties": false
      },
      "McpExportReportRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "expectedVersion": {
            "type": [
              "string",
              "integer"
            ],
            "pattern": "^-?(?:0|[1-9]\\d*)$"
          },
          "artifactSha256": {
            "type": [
              "string",
              "null"
            ]
          },
          "allowOfflineSnapshot": {
            "type": "boolean"
          }
        },
        "required": [
          "expectedVersion",
          "artifactSha256",
          "allowOfflineSnapshot"
        ],
        "additionalProperties": false
      },
      "McpReportJobSummary": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "platform": {
            "type": [
              "string",
              "null"
            ]
          },
          "deploymentTarget": {
            "type": [
              "string",
              "null"
            ]
          },
          "asOfUtc": {
            "type": "string",
            "format": "date-time"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "attempts": {
            "type": "integer"
          },
          "failureCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "artifact": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "format": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "fileName": {
                "type": "string"
              },
              "contentLength": {
                "type": "integer"
              },
              "sha256": {
                "type": "string"
              },
              "expiresAtUtc": {
                "type": "string",
                "format": "date-time"
              },
              "exportPolicy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contentRedacted": {
                "type": "boolean"
              },
              "presentationFingerprint": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "format",
              "contentType",
              "fileName",
              "contentLength",
              "sha256",
              "expiresAtUtc"
            ]
          }
        },
        "required": [
          "jobId",
          "state",
          "version",
          "kind",
          "format",
          "appId",
          "environment",
          "platform",
          "deploymentTarget",
          "asOfUtc",
          "createdAtUtc",
          "updatedAtUtc",
          "attempts",
          "failureCode",
          "artifact"
        ]
      },
      "McpReportJobPage": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "jobId": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "version": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "appId": {
                  "type": "string"
                },
                "environment": {
                  "type": "string"
                },
                "platform": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "deploymentTarget": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "asOfUtc": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAtUtc": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAtUtc": {
                  "type": "string",
                  "format": "date-time"
                },
                "attempts": {
                  "type": "integer"
                },
                "failureCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "artifact": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "format": {
                      "type": "string"
                    },
                    "contentType": {
                      "type": "string"
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "contentLength": {
                      "type": "integer"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "expiresAtUtc": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "exportPolicy": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "contentRedacted": {
                      "type": "boolean"
                    },
                    "presentationFingerprint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "format",
                    "contentType",
                    "fileName",
                    "contentLength",
                    "sha256",
                    "expiresAtUtc"
                  ]
                }
              },
              "required": [
                "jobId",
                "state",
                "version",
                "kind",
                "format",
                "appId",
                "environment",
                "platform",
                "deploymentTarget",
                "asOfUtc",
                "createdAtUtc",
                "updatedAtUtc",
                "attempts",
                "failureCode",
                "artifact"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "McpReportArtifactExport": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "artifact": {
            "type": "object",
            "properties": {
              "format": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "fileName": {
                "type": "string"
              },
              "contentLength": {
                "type": "integer"
              },
              "sha256": {
                "type": "string"
              },
              "expiresAtUtc": {
                "type": "string",
                "format": "date-time"
              },
              "exportPolicy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contentRedacted": {
                "type": "boolean"
              },
              "presentationFingerprint": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "format",
              "contentType",
              "fileName",
              "contentLength",
              "sha256",
              "expiresAtUtc"
            ]
          },
          "uri": {
            "type": "string"
          },
          "blob": {
            "type": "string"
          }
        },
        "required": [
          "jobId",
          "version",
          "artifact",
          "uri",
          "blob"
        ]
      },
      "ReportArtifactMetadata": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "format": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "contentLength": {
            "type": "integer"
          },
          "sha256": {
            "type": "string"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "exportPolicy": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "presentationFingerprint": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "format",
          "contentType",
          "fileName",
          "contentLength",
          "sha256",
          "expiresAtUtc"
        ]
      },
      "McpReportGenerationPreview": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ready"
          },
          "impact": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "format": {
                "type": "string"
              },
              "fromUtc": {
                "type": "string",
                "format": "date-time"
              },
              "toUtc": {
                "type": "string",
                "format": "date-time"
              },
              "sectionCount": {
                "type": "integer"
              },
              "allowOfflineSnapshot": {
                "type": "boolean"
              },
              "presentationPolicy": {
                "type": "string",
                "const": "mcp-redacted-v1"
              },
              "deliveryChannels": {
                "type": "array",
                "maxItems": 0,
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kind",
              "format",
              "fromUtc",
              "toUtc",
              "sectionCount",
              "allowOfflineSnapshot",
              "presentationPolicy",
              "deliveryChannels"
            ],
            "additionalProperties": false
          },
          "confirmation": {
            "$ref": "#/components/schemas/ProductReportConfirmation"
          }
        },
        "required": [
          "status",
          "impact",
          "confirmation"
        ],
        "additionalProperties": false
      },
      "McpReportArtifactPreview": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ready"
          },
          "impact": {
            "type": "object",
            "properties": {
              "jobId": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer"
              },
              "artifact": {
                "$ref": "#/components/schemas/ReportArtifactMetadata"
              },
              "disclosure": {
                "type": "string",
                "const": "An MCP-redacted offline report snapshot is disclosed to the connected assistant."
              }
            },
            "required": [
              "jobId",
              "version",
              "artifact",
              "disclosure"
            ],
            "additionalProperties": false
          },
          "confirmation": {
            "$ref": "#/components/schemas/ProductReportConfirmation"
          }
        },
        "required": [
          "status",
          "impact",
          "confirmation"
        ],
        "additionalProperties": false
      },
      "BiStructuredQueryCatalog": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "measures": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "definition": {
                  "type": "string"
                },
                "supportsGrouping": {
                  "type": "boolean"
                }
              },
              "required": [
                "key",
                "name",
                "unit",
                "definition",
                "supportsGrouping"
              ]
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ]
            }
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "measure": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "array",
                  "items": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "supportsPrevious": {
                  "type": "boolean"
                },
                "supportsCohort": {
                  "type": "boolean"
                },
                "supportsSeries": {
                  "type": "boolean",
                  "default": false
                },
                "supportsFunnel": {
                  "type": "boolean",
                  "default": false
                },
                "supportsGeography": {
                  "type": "boolean",
                  "default": false
                }
              },
              "required": [
                "measure",
                "dimensions",
                "filters",
                "supportsPrevious",
                "supportsCohort"
              ]
            }
          },
          "maximumRangeDays": {
            "type": "integer"
          },
          "maximumGroups": {
            "type": "integer"
          },
          "maximumCohortPeriods": {
            "type": "integer"
          }
        },
        "required": [
          "schemaVersion",
          "measures",
          "dimensions",
          "capabilities",
          "maximumRangeDays",
          "maximumGroups",
          "maximumCohortPeriods"
        ]
      },
      "BiStructuredQueryResult": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "measure": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "definition": {
            "type": "string"
          },
          "dimension": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "current": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "value": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "denominator": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "default": null
                    },
                    "percentage": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "availability": {
                      "type": "string",
                      "default": "available"
                    },
                    "unavailableReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "key",
                    "value"
                  ]
                },
                "maxItems": 20,
                "description": "Generic row projection bounded by the requested limit. isTruncated/omittedCount describe this projection; series, funnel or geography carries its separately bounded typed observations. Null populations/denominators are unknown, not zero."
              },
              "populationCount": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "populationUnit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "distinctValues": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "omittedCount": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "isTruncated": {
                "type": "boolean"
              },
              "availability": {
                "type": "string",
                "default": "available"
              },
              "unavailableReason": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "retention": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "metricKey": {
                    "type": "string"
                  },
                  "periodUnit": {
                    "type": "string"
                  },
                  "periodDays": {
                    "type": "integer"
                  },
                  "unavailableReason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cohorts": {
                    "type": "array",
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "cohortStart": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "cohortUsers": {
                          "type": "integer"
                        },
                        "cells": {
                          "type": "array",
                          "items": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "periodIndex": {
                                "type": "integer"
                              },
                              "retainedUsers": {
                                "type": "integer"
                              },
                              "retentionPercent": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "periodIndex",
                              "retainedUsers",
                              "retentionPercent"
                            ]
                          }
                        }
                      },
                      "required": [
                        "cohortStart",
                        "cohortUsers",
                        "cells"
                      ]
                    }
                  }
                },
                "required": [
                  "metricKey",
                  "periodUnit",
                  "periodDays",
                  "unavailableReason",
                  "cohorts"
                ],
                "default": null
              },
              "series": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "bucketMinutes": {
                    "type": "integer",
                    "enum": [
                      5,
                      15,
                      60,
                      1440
                    ]
                  },
                  "points": {
                    "type": "array",
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "bucketStart": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "value": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "bucketStart",
                        "value"
                      ]
                    },
                    "maxItems": 512,
                    "description": "Ordered UTC bucket starts. Missing buckets remain missing; no interpolation or invented zeros. The actual half-open window may intersect at most 512 aligned buckets, including partial boundary buckets."
                  }
                },
                "required": [
                  "bucketMinutes",
                  "points"
                ],
                "default": null
              },
              "funnel": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "usersMetricKey": {
                    "type": "string"
                  },
                  "conversionMetricKey": {
                    "type": "string"
                  },
                  "dropOffMetricKey": {
                    "type": "string"
                  },
                  "conversionWindowHours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 720
                  },
                  "unavailableReason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "eventKey": {
                          "type": "string"
                        },
                        "eventType": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "users": {
                          "type": "integer"
                        },
                        "dropOffUsers": {
                          "type": "integer"
                        },
                        "conversionFromPreviousPercent": {
                          "type": "number"
                        },
                        "conversionFromFirstPercent": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "eventKey",
                        "eventType",
                        "name",
                        "users",
                        "dropOffUsers",
                        "conversionFromPreviousPercent",
                        "conversionFromFirstPercent"
                      ]
                    },
                    "minItems": 2,
                    "maxItems": 8,
                    "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                  }
                },
                "required": [
                  "usersMetricKey",
                  "conversionMetricKey",
                  "dropOffMetricKey",
                  "conversionWindowHours",
                  "unavailableReason",
                  "steps"
                ],
                "default": null
              },
              "geography": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "previousFrom": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "previousTo": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "totalSessions": {
                    "type": "integer"
                  },
                  "locatedSessions": {
                    "type": "integer"
                  },
                  "unknownSessions": {
                    "type": "integer"
                  },
                  "suppressedCitySessions": {
                    "type": "integer"
                  },
                  "minimumCitySessions": {
                    "type": "integer"
                  },
                  "hasAnySessionsInScope": {
                    "type": "boolean"
                  },
                  "countries": {
                    "type": "array",
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "countryCode": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "sessions": {
                          "type": "integer"
                        },
                        "previousSessions": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "sharePercent": {
                          "type": "number"
                        },
                        "changePercent": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "countryCode",
                        "region",
                        "city",
                        "sessions",
                        "previousSessions",
                        "sharePercent",
                        "changePercent"
                      ]
                    },
                    "maxItems": 300
                  },
                  "cities": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/geography/properties/countries/items"
                    },
                    "maxItems": 12
                  }
                },
                "required": [
                  "from",
                  "to",
                  "previousFrom",
                  "previousTo",
                  "totalSessions",
                  "locatedSessions",
                  "unknownSessions",
                  "suppressedCitySessions",
                  "minimumCitySessions",
                  "hasAnySessionsInScope",
                  "countries",
                  "cities"
                ],
                "default": null,
                "description": "Coarse session geography with explicit total, located and unknown populations. Typed country/city payload bounds are independent of the generic row limit; no personal coordinates or location inference is added."
              }
            },
            "required": [
              "from",
              "to",
              "rows",
              "populationCount",
              "populationUnit",
              "distinctValues",
              "omittedCount",
              "isTruncated"
            ]
          },
          "previous": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "rows": {
                "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/rows",
                "maxItems": 20,
                "description": "Generic row projection bounded by the requested limit. isTruncated/omittedCount describe this projection; series, funnel or geography carries its separately bounded typed observations. Null populations/denominators are unknown, not zero."
              },
              "populationCount": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "populationUnit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "distinctValues": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "omittedCount": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "isTruncated": {
                "type": "boolean"
              },
              "availability": {
                "type": "string",
                "default": "available"
              },
              "unavailableReason": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "retention": {
                "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/retention",
                "default": null
              },
              "series": {
                "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/series",
                "default": null
              },
              "funnel": {
                "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/funnel",
                "default": null
              },
              "geography": {
                "$ref": "#/components/schemas/BiStructuredQueryResult/properties/current/properties/geography",
                "default": null
              }
            },
            "required": [
              "from",
              "to",
              "rows",
              "populationCount",
              "populationUnit",
              "distinctValues",
              "omittedCount",
              "isTruncated"
            ]
          }
        },
        "required": [
          "schemaVersion",
          "appId",
          "environment",
          "measure",
          "unit",
          "definition",
          "dimension",
          "version",
          "observedAt",
          "current",
          "previous"
        ]
      },
      "BiStructuredQueryRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "query": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "measure": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dimension": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "version": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "comparePrevious": {
                "type": "boolean",
                "default": false
              },
              "limit": {
                "type": [
                  "string",
                  "integer"
                ],
                "pattern": "^-?(?:0|[1-9]\\d*)$",
                "default": 10,
                "minimum": 1,
                "maximum": 20,
                "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
              },
              "filters": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "buildNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "eventType": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "eventName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "propertyName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "propertyValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "buildId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "groupId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  }
                },
                "additionalProperties": false,
                "patternProperties": {
                  "^[bB][uU][iI][lL][dD][nN][uU][mM][bB][eE][rR]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/buildNumber"
                  },
                  "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/eventType"
                  },
                  "^[eE][vV][eE][nN][tT][nN][aA][mM][eE]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/eventName"
                  },
                  "^[pP][rR][oO][pP][eE][rR][tT][yY][nN][aA][mM][eE]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/propertyName"
                  },
                  "^[pP][rR][oO][pP][eE][rR][tT][yY][vV][aA][lL][uU][eE]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/propertyValue"
                  },
                  "^[bB][uU][iI][lL][dD][iI][dD]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/buildId"
                  },
                  "^[gG][rR][oO][uU][pP][iI][dD]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters/properties/groupId"
                  }
                }
              },
              "cohort": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "periodDays": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "default": 1
                  },
                  "maximumPeriods": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "default": 14
                  }
                },
                "additionalProperties": false,
                "patternProperties": {
                  "^[pP][eE][rR][iI][oO][dD][dD][aA][yY][sS]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/cohort/properties/periodDays"
                  },
                  "^[mM][aA][xX][iI][mM][uU][mM][pP][eE][rR][iI][oO][dD][sS]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/cohort/properties/maximumPeriods"
                  }
                }
              },
              "series": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "bucketMinutes": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "default": 60,
                    "x-appportal-decoded-integer-enum": [
                      5,
                      15,
                      60,
                      1440
                    ]
                  }
                },
                "additionalProperties": false,
                "patternProperties": {
                  "^[bB][uU][cC][kK][eE][tT][mM][iI][nN][uU][tT][eE][sS]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/series/properties/bucketMinutes"
                  }
                }
              },
              "funnel": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "steps": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "eventType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "patternProperties": {
                        "^[eE][vV][eE][nN][tT][tT][yY][pP][eE]$": {
                          "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/funnel/properties/steps/items/properties/eventType"
                        },
                        "^[nN][aA][mM][eE]$": {
                          "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/funnel/properties/steps/items/properties/name"
                        }
                      }
                    },
                    "minItems": 2,
                    "maxItems": 8,
                    "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                  },
                  "conversionWindowHours": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "default": 24,
                    "minimum": 1,
                    "maximum": 720
                  }
                },
                "additionalProperties": false,
                "patternProperties": {
                  "^[sS][tT][eE][pP][sS]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/funnel/properties/steps"
                  },
                  "^[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN][wW][iI][nN][dD][oO][wW][hH][oO][uU][rR][sS]$": {
                    "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/funnel/properties/conversionWindowHours"
                  }
                }
              },
              "geography": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "patternProperties": {
              "^[mM][eE][aA][sS][uU][rR][eE]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/measure"
              },
              "^[dD][iI][mM][eE][nN][sS][iI][oO][nN]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/dimension"
              },
              "^[vV][eE][rR][sS][iI][oO][nN]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/version"
              },
              "^[cC][oO][mM][pP][aA][rR][eE][pP][rR][eE][vV][iI][oO][uU][sS]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/comparePrevious"
              },
              "^[lL][iI][mM][iI][tT]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/limit"
              },
              "^[fF][iI][lL][tT][eE][rR][sS]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/filters"
              },
              "^[cC][oO][hH][oO][rR][tT]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/cohort"
              },
              "^[sS][eE][rR][iI][eE][sS]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/series"
              },
              "^[fF][uU][nN][nN][eE][lL]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/funnel"
              },
              "^[gG][eE][oO][gG][rR][aA][pP][hH][yY]$": {
                "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query/properties/geography"
              }
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "patternProperties": {
          "^[qQ][uU][eE][rR][yY]$": {
            "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/query"
          },
          "^[fF][rR][oO][mM]$": {
            "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/from"
          },
          "^[tT][oO]$": {
            "$ref": "#/components/schemas/BiStructuredQueryRequest/properties/to"
          }
        }
      },
      "BiSavedWidgetQueryRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "dashboardVersion": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "patternProperties": {
          "^[fF][rR][oO][mM]$": {
            "$ref": "#/components/schemas/BiSavedWidgetQueryRequest/properties/from"
          },
          "^[tT][oO]$": {
            "$ref": "#/components/schemas/BiSavedWidgetQueryRequest/properties/to"
          },
          "^[dD][aA][sS][hH][bB][oO][aA][rR][dD][vV][eE][rR][sS][iI][oO][nN]$": {
            "$ref": "#/components/schemas/BiSavedWidgetQueryRequest/properties/dashboardVersion"
          }
        }
      },
      "BiAgentStructuredQuery": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "available",
              "unavailable",
              "unsupported"
            ]
          },
          "captureComplete": {
            "const": false
          },
          "result": {
            "$ref": "#/components/schemas/BiStructuredQueryResult"
          },
          "contentRedacted": {
            "type": "boolean"
          },
          "contentTruncated": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "captureComplete",
          "result",
          "contentRedacted",
          "contentTruncated"
        ],
        "additionalProperties": false
      },
      "BiAskRequest": {
        "type": "object",
        "properties": {
          "question": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 1024
          },
          "followupToken": {
            "type": [
              "string",
              "null"
            ],
            "default": null,
            "maxLength": 8192
          }
        },
        "additionalProperties": false,
        "patternProperties": {
          "^[qQ][uU][eE][sS][tT][iI][oO][nN]$": {
            "$ref": "#/components/schemas/BiAskRequest/properties/question"
          },
          "^[fF][oO][lL][lL][oO][wW][uU][pP][tT][oO][kK][eE][nN]$": {
            "$ref": "#/components/schemas/BiAskRequest/properties/followupToken"
          }
        }
      },
      "BiAskResponse": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "unsupported",
              "clarification"
            ]
          },
          "captureComplete": {
            "type": "boolean",
            "const": false
          },
          "narrative": {
            "type": "string"
          },
          "generatedQuery": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "language": {
                "type": "string"
              },
              "query": {
                "type": "object",
                "properties": {
                  "measure": {
                    "type": "string"
                  },
                  "dimension": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "comparePrevious": {
                    "type": "boolean",
                    "default": false
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                  },
                  "filters": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "buildNumber": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "eventType": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "eventName": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "propertyName": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "propertyValue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "buildId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      },
                      "groupId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "default": null
                      }
                    },
                    "additionalProperties": false
                  },
                  "cohort": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "periodDays": {
                        "type": "integer",
                        "default": 1
                      },
                      "maximumPeriods": {
                        "type": "integer",
                        "default": 14
                      }
                    },
                    "additionalProperties": false
                  },
                  "series": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "bucketMinutes": {
                        "type": "integer",
                        "default": 60,
                        "enum": [
                          5,
                          15,
                          60,
                          1440
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "funnel": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "steps": {
                        "type": "array",
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "eventType": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "eventType",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 2,
                        "maxItems": 8,
                        "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                      },
                      "conversionWindowHours": {
                        "type": "integer",
                        "default": 24,
                        "minimum": 1,
                        "maximum": 720
                      }
                    },
                    "required": [
                      "steps"
                    ],
                    "additionalProperties": false
                  },
                  "geography": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "measure"
                ],
                "additionalProperties": false
              },
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "maximumAggregateCalls": {
                "type": "integer"
              },
              "timeoutSeconds": {
                "type": "integer"
              },
              "explanation": {
                "type": "string"
              }
            },
            "required": [
              "language",
              "query",
              "from",
              "to",
              "maximumAggregateCalls",
              "timeoutSeconds",
              "explanation"
            ]
          },
          "chartSpec": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "widgetId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "query": {
                "type": "object",
                "properties": {
                  "measure": {
                    "type": "string"
                  },
                  "dimension": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "comparePrevious": {
                    "type": "boolean",
                    "default": false
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Bounds the generic row projection. Independently bounded typed payloads can retain more observations; a row-table limit is not the full series/funnel/geography population."
                  },
                  "filters": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/generatedQuery/properties/query/properties/filters"
                  },
                  "cohort": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/generatedQuery/properties/query/properties/cohort"
                  },
                  "series": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/generatedQuery/properties/query/properties/series"
                  },
                  "funnel": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/generatedQuery/properties/query/properties/funnel"
                  },
                  "geography": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/generatedQuery/properties/query/properties/geography"
                  }
                },
                "required": [
                  "measure"
                ],
                "additionalProperties": false
              },
              "visualization": {
                "type": "string",
                "default": "kpi",
                "enum": [
                  "kpi",
                  "table",
                  "bar",
                  "cohort",
                  "heatmap",
                  "stacked",
                  "time-series",
                  "funnel",
                  "geo"
                ],
                "description": "Choose a visualization compatible with the stored query shape. Stacks require disjoint additive counts; distinct users/sessions, ratios and percentiles cannot be stacked."
              },
              "columnSpan": {
                "type": "integer",
                "default": 1
              }
            },
            "required": [
              "widgetId",
              "title",
              "query"
            ],
            "additionalProperties": false
          },
          "result": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "schemaVersion": {
                "type": "string"
              },
              "appId": {
                "type": "string"
              },
              "environment": {
                "type": "string"
              },
              "measure": {
                "type": "string"
              },
              "unit": {
                "type": "string"
              },
              "definition": {
                "type": "string"
              },
              "dimension": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "observedAt": {
                "type": "string",
                "format": "date-time"
              },
              "current": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "denominator": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "default": null
                        },
                        "percentage": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "default": null
                        },
                        "availability": {
                          "type": "string",
                          "default": "available"
                        },
                        "unavailableReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    },
                    "maxItems": 20,
                    "description": "Generic row projection bounded by the requested limit. isTruncated/omittedCount describe this projection; series, funnel or geography carries its separately bounded typed observations. Null populations/denominators are unknown, not zero."
                  },
                  "populationCount": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "populationUnit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "distinctValues": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "omittedCount": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "isTruncated": {
                    "type": "boolean"
                  },
                  "availability": {
                    "type": "string",
                    "default": "available"
                  },
                  "unavailableReason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "retention": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "metricKey": {
                        "type": "string"
                      },
                      "periodUnit": {
                        "type": "string"
                      },
                      "periodDays": {
                        "type": "integer"
                      },
                      "unavailableReason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cohorts": {
                        "type": "array",
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "cohortStart": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "cohortUsers": {
                              "type": "integer"
                            },
                            "cells": {
                              "type": "array",
                              "items": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "periodIndex": {
                                    "type": "integer"
                                  },
                                  "retainedUsers": {
                                    "type": "integer"
                                  },
                                  "retentionPercent": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "periodIndex",
                                  "retainedUsers",
                                  "retentionPercent"
                                ]
                              }
                            }
                          },
                          "required": [
                            "cohortStart",
                            "cohortUsers",
                            "cells"
                          ]
                        }
                      }
                    },
                    "required": [
                      "metricKey",
                      "periodUnit",
                      "periodDays",
                      "unavailableReason",
                      "cohorts"
                    ],
                    "default": null
                  },
                  "series": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "bucketMinutes": {
                        "type": "integer",
                        "enum": [
                          5,
                          15,
                          60,
                          1440
                        ]
                      },
                      "points": {
                        "type": "array",
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "bucketStart": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "bucketStart",
                            "value"
                          ]
                        },
                        "maxItems": 512,
                        "description": "Ordered UTC bucket starts. Missing buckets remain missing; no interpolation or invented zeros. The actual half-open window may intersect at most 512 aligned buckets, including partial boundary buckets."
                      }
                    },
                    "required": [
                      "bucketMinutes",
                      "points"
                    ],
                    "default": null
                  },
                  "funnel": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "usersMetricKey": {
                        "type": "string"
                      },
                      "conversionMetricKey": {
                        "type": "string"
                      },
                      "dropOffMetricKey": {
                        "type": "string"
                      },
                      "conversionWindowHours": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 720
                      },
                      "unavailableReason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "steps": {
                        "type": "array",
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "eventKey": {
                              "type": "string"
                            },
                            "eventType": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "users": {
                              "type": "integer"
                            },
                            "dropOffUsers": {
                              "type": "integer"
                            },
                            "conversionFromPreviousPercent": {
                              "type": "number"
                            },
                            "conversionFromFirstPercent": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "eventKey",
                            "eventType",
                            "name",
                            "users",
                            "dropOffUsers",
                            "conversionFromPreviousPercent",
                            "conversionFromFirstPercent"
                          ]
                        },
                        "minItems": 2,
                        "maxItems": 8,
                        "description": "Ordered canonical event type/name steps. Later conversion observations can fall after the entry-window end, within the configured conversion deadline; this is not a ranking of independent event totals."
                      }
                    },
                    "required": [
                      "usersMetricKey",
                      "conversionMetricKey",
                      "dropOffMetricKey",
                      "conversionWindowHours",
                      "unavailableReason",
                      "steps"
                    ],
                    "default": null
                  },
                  "geography": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "from": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "to": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "previousFrom": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "previousTo": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "totalSessions": {
                        "type": "integer"
                      },
                      "locatedSessions": {
                        "type": "integer"
                      },
                      "unknownSessions": {
                        "type": "integer"
                      },
                      "suppressedCitySessions": {
                        "type": "integer"
                      },
                      "minimumCitySessions": {
                        "type": "integer"
                      },
                      "hasAnySessionsInScope": {
                        "type": "boolean"
                      },
                      "countries": {
                        "type": "array",
                        "items": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "countryCode": {
                              "type": "string"
                            },
                            "region": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "sessions": {
                              "type": "integer"
                            },
                            "previousSessions": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "sharePercent": {
                              "type": "number"
                            },
                            "changePercent": {
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "countryCode",
                            "region",
                            "city",
                            "sessions",
                            "previousSessions",
                            "sharePercent",
                            "changePercent"
                          ]
                        },
                        "maxItems": 300
                      },
                      "cities": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/geography/properties/countries/items"
                        },
                        "maxItems": 12
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "previousFrom",
                      "previousTo",
                      "totalSessions",
                      "locatedSessions",
                      "unknownSessions",
                      "suppressedCitySessions",
                      "minimumCitySessions",
                      "hasAnySessionsInScope",
                      "countries",
                      "cities"
                    ],
                    "default": null,
                    "description": "Coarse session geography with explicit total, located and unknown populations. Typed country/city payload bounds are independent of the generic row limit; no personal coordinates or location inference is added."
                  }
                },
                "required": [
                  "from",
                  "to",
                  "rows",
                  "populationCount",
                  "populationUnit",
                  "distinctValues",
                  "omittedCount",
                  "isTruncated"
                ]
              },
              "previous": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "rows": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/rows",
                    "maxItems": 20,
                    "description": "Generic row projection bounded by the requested limit. isTruncated/omittedCount describe this projection; series, funnel or geography carries its separately bounded typed observations. Null populations/denominators are unknown, not zero."
                  },
                  "populationCount": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "populationUnit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "distinctValues": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "omittedCount": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "isTruncated": {
                    "type": "boolean"
                  },
                  "availability": {
                    "type": "string",
                    "default": "available"
                  },
                  "unavailableReason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "retention": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/retention",
                    "default": null
                  },
                  "series": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/series",
                    "default": null
                  },
                  "funnel": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/funnel",
                    "default": null
                  },
                  "geography": {
                    "$ref": "#/components/schemas/BiAskResponse/properties/result/properties/current/properties/geography",
                    "default": null
                  }
                },
                "required": [
                  "from",
                  "to",
                  "rows",
                  "populationCount",
                  "populationUnit",
                  "distinctValues",
                  "omittedCount",
                  "isTruncated"
                ]
              }
            },
            "required": [
              "schemaVersion",
              "appId",
              "environment",
              "measure",
              "unit",
              "definition",
              "dimension",
              "version",
              "observedAt",
              "current",
              "previous"
            ]
          },
          "followupToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "clarifications": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "contentRedacted": {
            "type": "boolean",
            "default": false
          },
          "contentTruncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "schemaVersion",
          "status",
          "captureComplete",
          "narrative",
          "generatedQuery",
          "chartSpec",
          "result",
          "followupToken",
          "clarifications"
        ]
      }
    },
    "securitySchemes": {
      "mcpBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "MCP-audience OAuth access token from an explicitly authenticated CLI profile. Dashboard cookies, product/SDK/server/upload credentials and other bearer audiences are rejected. Scopes constrain a request; current membership, app analytics access, concrete environment, consent and plan entitlements remain mandatory. Free does not include BI."
      }
    }
  },
  "x-appportal-source": "AppPortal.Api/Endpoints/McpBiEndpoints.cs and McpBiMutationEndpoints.cs; actual Contracts and linked pure request/metric sources",
  "x-appportal-scope": "BI HTTP adapter only. Other agent-data operations, local MCP discovery/JSON-RPC, public embedding and product browser reporting are separate contracts.",
  "x-appportal-query-validation": "Only documented query keys, one value each. Scope selectors narrow current authority and cannot grant organization/app access. Unknown or repeated keys are rejected.",
  "x-appportal-evidence": "Provider reads are live aggregates, not an atomic cross-store snapshot or a claim that capture is complete. Missing/unsupported providers are not successful zero results.",
  "x-appportal-reference-source": "8bda8e8302d4ea5bd005ef1132f7267e82e6337c"
}
