> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.select.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List monitor runs

> Lists the runs of every monitor the caller can read, newest first by default. `row_count` counts every run matching the request, not just the page returned. Requires `monitors:read`.



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json get /monitors/run-history
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
tags:
  - name: metrics
    description: >-
      Query cost and usage data across Snowflake, BigQuery, Databricks and
      Tableau. Each route is `POST /v2/metrics/<model>/query` for one semantic
      model. Every route takes the same body shape and returns the same response
      shape. Each route page gives guidance on when to use the route, and worked
      examples.


      ## Body shape


      | Field | Meaning |

      | --- | --- |

      | `measures` | Aggregates to compute, for example `sum_spend`. |

      | `dimensions` | Fields to group by. Each one is returned on every row. |

      | `filter_expression` | An `and`/`or` tree of filters on dimensions,
      applied before aggregation. |

      | `measure_filters` | Filters on measures, applied after aggregation. |

      | `sort` | The order of the rows: `[{"field": "sum_spend", "direction":
      "desc"}]`. |

      | `limit` | The maximum number of rows. Results are not paginated: `limit`
      cuts the result short, and there is no next page. Omit `limit` to get all
      rows. |

      | `aggregate` | Set `false` to list the rows with no grouping. See
      "Listing rows". |


      v2 accepts only `filter_expression`. The body refuses the legacy `filters`
      list.


      ## Filter on dates


      Filter on the `day` field. Use two filters (both bounds are inclusive):


      ```json

      {"operator": "and", "filters": [
        {"field": "day", "operator": ">=", "value": "2026-08-01"},
        {"field": "day", "operator": "<=", "value": "2026-08-31"}], "limit": 1000}
      ```


      Or use one relative filter: `{"field": "day", "operator": "in range",
      "value": "30D"}`. The values are `{N}D` and `{N}M` (the last N days or
      months, today included), `WTD`, `MTD`, `QTD`, `YTD`, and `LMTD` (the whole
      previous calendar month).


      - Do not filter on `hour`, `week`, `month` or `quarter` to bound a range.
      Filter on `day`, and use the coarser fields as dimensions.

      - A timestamp such as `start_time <= "2026-08-31"` compares to midnight
      and drops most of that day. Use `day`, or `start_time < "2026-09-01"`.

      - A snapshot route (for example `snowflake-storage-summary`) describes the
      current state, and a `day` filter does not bound its size and cost fields.
      On routes that join the snapshot to activity, `day` bounds only the
      activity fields. Each route page says which fields these are.


      ## Which measure is cost


      - `sum_spend` (or `spend`, or `cost` on some routes) is the dollar cost in
      the filtered period. Use it for "how much did we spend".

      - `*_annualized` measures extend the spend of the filtered period to a
      year: a `7D` range gives that week's spend times 365 / 7. They are
      projections, not spend.

      - On snapshot routes, `annual_cost`, `*_monthly_cost` and `*_annual_cost`
      are the current rate extended to a month or a year. A date range does not
      bound them.

      - Do not present any of these run-rates as spend in a period.

      - Databricks routes also give DBUs (for example `sum_task_usage`). DBUs
      are not dollars.


      The `spend` route is the consolidated cost of every platform. Use it for
      totals, trends and breakdowns by service. Use a platform route to explain
      what inside the platform caused the cost.


      ## Text values are case-sensitive


      Filter values must match the stored case. A value in the wrong case
      matches no rows, with no error. For example:


      - On `spend`, `connection_type` is `Snowflake`, `Bigquery` or
      `Databricks`, and `"snowflake"` matches nothing.

      - On `search`, `data-freshness` and `workload-metadata-suggestions`,
      `connection_type` is lowercase: `snowflake`, `bigquery`, `databricks`.

      - On `snowflake-workloads`, most `resource_type` values are lowercase keys
      (`query_pattern`, `dbt`), but the AI types are title case (`Cortex
      Analyst`).


      ## Usage groups


      A usage group set divides cost into named groups, such as departments or
      teams. To group by the groups of one set, name the set in `path`:


      ```json

      {"dimensions": [{"field": "usage_group", "path": ["Department"]}],
      "limit": 1000}

      ```


      `path[0]` is the name of the set, not its ID. A plain `"usage_group"`
      dimension groups by every set at once. The same `{"field": ..., "path":
      [...]}` form reads keys of other semi-structured fields, for example
      workload metadata.


      ## Period over period


      Some routes publish `<measure>_previous_period`, `change_<measure>` and
      `percent_change_<measure>`. These measures need one bounded date range on
      `day`, at the top level of `filter_expression`:


      - Use two bounds on `day`, or one `in range` filter. Do not mix the two
      forms.

      - Do not nest the date filter in a sub-expression, and do not bound the
      range with `month` or `quarter`.

      - The previous period is the same number of days, just before the range.
      For `QTD` on 2026-09-28 (2026-07-01 to 2026-09-28, 90 days), the previous
      period is 2026-04-02 to 2026-06-30, not the previous calendar quarter.


      ## Listing rows


      Set `"aggregate": false` and name only `dimensions` to get the rows as
      they are, for example the individual queries that ran longer than ten
      minutes. If the body also names `measures` or `measure_filters`, the route
      aggregates, with no error. Always set a `limit` on a listing.


      ## Default scoping filters


      Some tables hold more than one kind of row, and the SELECT app filters to
      one kind by default. Each route page names these filters. For example:


      - `snowflake-query-patterns`: `{"field": "resource_type", "operator":
      "in", "values": ["query_pattern"]}`. `bigquery-query-patterns` filters
      `workload_type` to `bigquery_query_pattern`, and
      `databricks-query-patterns` filters `resource_type` to
      `databricks_query_pattern`.

      - `snowflake-dbt`: `{"field": "dbt_node_resource_type", "operator": "=",
      "value": "model"}`. Without it, tests, seeds and snapshots rank with
      models. The same filter applies to `bigquery-dbt-queries` and
      `databricks-dbt-queries`.


      ## Teams


      Send `X-Team-Id` to evaluate a query as a team you belong to. The rows are
      then limited to what the team's roles can reach.


      ## Which route answers which question


      | Question | Route |

      | --- | --- |

      | Total spend, spend trend, spend by platform, service or usage group |
      `spend` |

      | Most expensive Snowflake warehouses | `snowflake-workloads` (or
      `snowflake-warehouses` for metering spend) |

      | Warehouse utilization, idle spend, cluster usage |
      `snowflake-warehouses`, `snowflake-warehouse-clusters` |

      | Query latency, spillage and bytes scanned on a warehouse |
      `snowflake-warehouse-query-performance` |

      | Most expensive recurring queries | `snowflake-query-patterns` |

      | Individual queries | `snowflake-queries` |

      | Cost of dbt models, and of dbt runs | `snowflake-dbt`,
      `snowflake-dbt-invocations` |

      | Cost of tasks, stored procedures, dynamic tables | `snowflake-tasks`,
      `snowflake-stored-procedures`, `snowflake-dynamic-tables` |

      | Cost of BI tools (Looker, Mode, Hex, Sigma, Periscope, Tableau) |
      `snowflake-looker`, `snowflake-mode`, `snowflake-hex`, `snowflake-sigma`,
      `snowflake-periscope`, `tableau-queries` |

      | Cost of Fivetran, and of workloads defined by query tags |
      `snowflake-fivetran`, `snowflake-custom-workloads` |

      | Serverless, automatic clustering and Snowpipe cost |
      `snowflake-serverless`, `snowflake-automatic-clustering`,
      `snowflake-snowpipe` |

      | Storage cost in a period | `snowflake-storage`, `bigquery-storage-spend`
      |

      | Largest or unused tables now | `snowflake-storage-summary`,
      `bigquery-storage-summary` |

      | Which workloads read or write a table | `lineage-workloads`,
      `lineage-tables`, `lineage-edges` |

      | BigQuery cost by project, job or query pattern | `bigquery-projects`,
      `bigquery-jobs`, `bigquery-query-patterns` |

      | BigQuery reservations and commitments | `bigquery-reservation-timeline`,
      `bigquery-commitments`, `bigquery-commitment-scopes` |

      | Databricks cost by job, query, SQL warehouse or cluster |
      `databricks-jobs`, `databricks-queries`, `databricks-sql-warehouses`,
      `databricks-clusters` |

      | Savings from SELECT actions | `action-realized-savings` |

      | How current the data is | `data-freshness` |
paths:
  /monitors/run-history:
    get:
      tags:
        - monitors
      summary: List monitor runs
      description: >-
        Lists the runs of every monitor the caller can read, newest first by
        default. `row_count` counts every run matching the request, not just the
        page returned. Requires `monitors:read`.
      operationId: list_runs_route_monitors_run_history_get
      parameters:
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - start_time
              - finish_time
            type: string
            description: Field to sort by. Defaults to `start_time`.
            default: start_time
            title: Sort By
          description: Field to sort by. Defaults to `start_time`.
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: '`asc` or `desc` (default).'
            default: desc
            title: Sort Order
          description: '`asc` or `desc` (default).'
        - name: page_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Opaque cursor from a previous response. Omit on the first call.
            title: Page Token
          description: Opaque cursor from a previous response. Omit on the first call.
        - name: max_results
          in: query
          required: false
          schema:
            type: integer
            default: 50
            title: Max Results
        - name: trigger_status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Trigger Status  In
        - name: trigger_status__not_in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Trigger Status  Not In
        - name: run_status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Run Status  In
        - name: run_status__not_in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Run Status  Not In
        - name: status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status  In
        - name: status__not_in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status  Not In
        - name: notification_sent
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Notification Sent
        - name: period_start_time__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Period Start Time  Gte
        - name: period_start_time__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Period Start Time  Lt
        - name: period_end_time__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Period End Time  Gte
        - name: period_end_time__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Period End Time  Lt
        - name: start_time__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Time  Gte
        - name: start_time__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Time  Lt
        - name: monitor_id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Monitor Id  In
        - name: monitor_id__not_in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Monitor Id  Not In
        - name: monitor_dismissed
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Monitor Dismissed
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorRunList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    MonitorRunList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/MonitorRun'
          type: array
          title: Items
        page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Token
          description: Opaque cursor for the next page; empty/absent on the last page.
        row_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row Count
          description: >-
            Best-effort total for the filtered result set; may be null when
            expensive.
      type: object
      required:
        - items
      title: MonitorRunList
      description: A page of monitor runs.
    MonitorRun:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier of the run.
          readOnly: true
          x-terraform-computed: true
        monitor_id:
          type: string
          title: Monitor Id
          description: The monitor that ran.
          readOnly: true
          x-terraform-computed: true
        monitor_name:
          type: string
          title: Monitor Name
          description: The monitor's current name.
          readOnly: true
          x-terraform-computed: true
        type:
          type: string
          enum:
            - digest
            - condition
            - anomaly_prophet
            - anomaly_percentile
            - budget_threshold
          title: Type
          description: >-
            What kind of check the run made. The same value as
            `trigger_config.type`.
          readOnly: true
          x-terraform-computed: true
        trigger_config:
          oneOf:
            - $ref: '#/components/schemas/DigestTrigger'
            - $ref: '#/components/schemas/ConditionTrigger-Output'
            - $ref: '#/components/schemas/AnomalyProphetTrigger-Output'
            - $ref: '#/components/schemas/AnomalyPercentileTrigger-Output'
            - $ref: '#/components/schemas/BudgetThresholdTrigger-Output'
          title: Trigger Config
          description: >-
            The trigger the run evaluated, as the monitor was configured when it
            ran.
          readOnly: true
          discriminator:
            propertyName: type
            mapping:
              anomaly_percentile:
                $ref: '#/components/schemas/AnomalyPercentileTrigger-Output'
              anomaly_prophet:
                $ref: '#/components/schemas/AnomalyProphetTrigger-Output'
              budget_threshold:
                $ref: '#/components/schemas/BudgetThresholdTrigger-Output'
              condition:
                $ref: '#/components/schemas/ConditionTrigger-Output'
              digest:
                $ref: '#/components/schemas/DigestTrigger'
          x-terraform-computed: true
        run_status:
          type: string
          enum:
            - success
            - failure
          title: Run Status
          description: >-
            Whether the run completed. `failure` means it could not be
            evaluated, and `error_message` says why.
          readOnly: true
          x-terraform-computed: true
        trigger_status:
          type: string
          enum:
            - triggered
            - not_triggered
            - skipped
            - snoozed
            - unknown
          title: Trigger Status
          description: >-
            Whether the trigger fired. `skipped` means the trigger was not
            evaluated — an anomaly check without enough history yet, a digest
            with nothing to report, or a budget that has ended — which is not
            the same as `not_triggered`.
          readOnly: true
          x-terraform-computed: true
        notification_sent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Notification Sent
          description: >-
            Whether the run sent a notification to the monitor's destinations.
            Null on runs recorded before sends were tracked.
          readOnly: true
          x-terraform-computed: true
        status:
          type: string
          enum:
            - success
            - failure
            - triggered
            - skipped
            - snoozed
            - unknown
          title: Status
          description: >-
            The run summarized in one value, as the feed and the monitor's
            `latest_run_status` report it: `failure` if the run failed,
            otherwise the trigger's outcome, with `not_triggered` reported as
            `success`.
          readOnly: true
          x-terraform-computed: true
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Why the run failed. Null unless it did.
          readOnly: true
          x-terraform-computed: true
        trigger_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Trigger Value
          description: >-
            The value the trigger evaluated. Null on a digest, or on a run that
            failed before it had one.
          readOnly: true
          x-terraform-computed: true
        trigger_details:
          anyOf:
            - $ref: '#/components/schemas/MonitorRunTriggerDetails'
            - type: 'null'
          description: What `trigger_value` was measured against.
          readOnly: true
          x-terraform-computed: true
        partition_config:
          anyOf:
            - $ref: '#/components/schemas/PartitionConfig'
            - type: 'null'
          description: >-
            The columns the run was partitioned by, as the monitor was
            configured when it ran. Null on a run over the data as a whole.
          readOnly: true
          x-terraform-computed: true
        observed_partition_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Observed Partition Count
          description: On a partitioned run, how many partitions it evaluated.
          readOnly: true
          x-terraform-computed: true
        triggered_partitions:
          anyOf:
            - items:
                $ref: '#/components/schemas/MonitorRunPartition'
              type: array
            - type: 'null'
          title: Triggered Partitions
          description: >-
            On a partitioned run, the partitions whose data crossed the trigger,
            each with its own outcome. Null on a run over the data as a whole.
          readOnly: true
          x-terraform-computed: true
        destination_ids:
          items:
            type: string
          type: array
          title: Destination Ids
          description: >-
            The alert destinations the monitor was configured to notify when it
            ran. Listed whether or not the run sent anything: see
            `notification_sent`.
          readOnly: true
          x-terraform-computed: true
        period_start_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Period Start Time
          description: RFC 3339 UTC start of the period the run evaluated.
          readOnly: true
          x-terraform-computed: true
        period_end_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Period End Time
          description: RFC 3339 UTC end of the period the run evaluated.
          readOnly: true
          x-terraform-computed: true
        start_time:
          type: string
          title: Start Time
          description: RFC 3339 UTC time the run started.
          readOnly: true
          x-terraform-computed: true
        finish_time:
          type: string
          title: Finish Time
          description: RFC 3339 UTC time the run finished.
          readOnly: true
          x-terraform-computed: true
      type: object
      required:
        - id
        - monitor_id
        - monitor_name
        - type
        - trigger_config
        - run_status
        - trigger_status
        - status
        - destination_ids
        - start_time
        - finish_time
      title: MonitorRun
      description: >-
        One scheduled run of a monitor, and what came of it.


        Three fields answer different questions. `run_status` says whether the
        run

        completed. `trigger_status` says whether the trigger fired.
        `notification_sent`

        says whether anything was sent: a run can fire and send nothing when the

        monitor's `notification_frequency_config` holds the notification back.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
    DigestTrigger:
      properties:
        type:
          type: string
          const: digest
          title: Type
          default: digest
        skip_if_empty:
          type: boolean
          title: Skip If Empty
      type: object
      required:
        - skip_if_empty
      title: DigestTrigger
    ConditionTrigger-Output:
      properties:
        type:
          type: string
          const: condition
          title: Type
          default: condition
        query:
          $ref: '#/components/schemas/MonitorQuery-Output'
        operator:
          type: string
          enum:
            - '>'
            - '>='
            - <
            - <=
            - '=='
            - '!='
          title: Operator
        threshold:
          type: number
          title: Threshold
        trigger:
          type: string
          enum:
            - always
            - on_condition_met
            - on_status_change
          title: Trigger
      type: object
      required:
        - query
        - operator
        - threshold
        - trigger
      title: ConditionTrigger
    AnomalyProphetTrigger-Output:
      properties:
        type:
          type: string
          const: anomaly_prophet
          title: Type
          default: anomaly_prophet
        query:
          $ref: '#/components/schemas/MonitorQuery-Output'
        sensitivity:
          type: number
          maximum: 50
          minimum: 0
          title: Sensitivity
          description: Sensitivity level for anomaly detection (0-50)
        trigger_on_upper_band:
          type: boolean
          title: Trigger On Upper Band
          default: true
        trigger_on_lower_band:
          type: boolean
          title: Trigger On Lower Band
          default: true
        minimum_threshold:
          anyOf:
            - type: number
            - type: 'null'
          title: Minimum Threshold
          description: Minimum threshold value for anomaly detection
      type: object
      required:
        - query
        - sensitivity
      title: AnomalyProphetTrigger
    AnomalyPercentileTrigger-Output:
      properties:
        type:
          type: string
          const: anomaly_percentile
          title: Type
          default: anomaly_percentile
        query:
          $ref: '#/components/schemas/MonitorQuery-Output'
        upper_percentile:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Upper Percentile
          description: Upper percentile threshold (e.g., 95 for 95th percentile)
        lower_percentile:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Lower Percentile
          description: Lower percentile threshold (e.g., 5 for 5th percentile)
        deviations:
          anyOf:
            - type: number
              maximum: 10
              minimum: 0
            - type: 'null'
          title: Deviations
          description: Number of standard deviations from percentile threshold
        minimum_threshold:
          anyOf:
            - type: number
            - type: 'null'
          title: Minimum Threshold
          description: Minimum threshold value for anomaly detection
      type: object
      required:
        - query
      title: AnomalyPercentileTrigger
      description: |-
        Percentile-based anomaly detection trigger.
        Triggers when the latest value exceeds historical percentile thresholds.
    BudgetThresholdTrigger-Output:
      properties:
        type:
          type: string
          const: budget_threshold
          title: Type
          default: budget_threshold
        query:
          anyOf:
            - $ref: '#/components/schemas/MonitorQuery-Output'
            - type: 'null'
        thresholds:
          items:
            $ref: '#/components/schemas/BudgetThreshold'
          type: array
          title: Thresholds
      type: object
      required:
        - thresholds
      title: BudgetThresholdTrigger
      description: >-
        Represents a budget monitor's threshold trigger. Can contain multiple
        budget thresholds.
    MonitorRunTriggerDetails:
      properties:
        upper_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: Upper Bound
          description: >-
            The value above which the trigger fires: the threshold, or the top
            of the expected range for an anomaly check. Null when there is none.
          readOnly: true
          x-terraform-computed: true
        lower_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: Lower Bound
          description: >-
            The value below which the trigger fires: the threshold, or the
            bottom of the expected range for an anomaly check. Null when there
            is none.
          readOnly: true
          x-terraform-computed: true
        is_anomaly:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Anomaly
          description: On an anomaly check, whether the value fell outside the range.
          readOnly: true
          x-terraform-computed: true
        bound_crossed:
          anyOf:
            - type: string
              enum:
                - upper
                - lower
            - type: 'null'
          title: Bound Crossed
          description: On an anomaly check that fired, which bound the value crossed.
          readOnly: true
          x-terraform-computed: true
        actual_spend:
          anyOf:
            - type: number
            - type: 'null'
          title: Actual Spend
          description: On a budget check, the budget's spend so far this period.
          readOnly: true
          x-terraform-computed: true
        forecast_spend:
          anyOf:
            - type: number
            - type: 'null'
          title: Forecast Spend
          description: On a budget check, the budget's forecast spend for the period.
          readOnly: true
          x-terraform-computed: true
        budget_amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Budget Amount
          description: On a budget check, the budget's amount for the period.
          readOnly: true
          x-terraform-computed: true
        triggered_thresholds:
          anyOf:
            - items:
                $ref: '#/components/schemas/BudgetThreshold'
              type: array
            - type: 'null'
          title: Triggered Thresholds
          description: >-
            On a budget check, the thresholds this run crossed for the first
            time this period.
          readOnly: true
          x-terraform-computed: true
      type: object
      title: MonitorRunTriggerDetails
      description: What the trigger measured the run's value against.
    PartitionConfig:
      properties:
        partition_columns:
          anyOf:
            - items:
                $ref: '#/components/schemas/PartitionColumn'
              type: array
            - type: 'null'
          title: Partition Columns
      type: object
      title: PartitionConfig
    MonitorRunPartition:
      properties:
        partition_value:
          additionalProperties: true
          type: object
          title: Partition Value
          description: The partition's column values, keyed by column title.
          readOnly: true
          x-terraform-computed: true
        trigger_status:
          type: string
          enum:
            - triggered
            - not_triggered
            - skipped
            - snoozed
            - unknown
          title: Trigger Status
          description: >-
            Whether this partition's trigger fired. A run evaluates at most 10
            partitions; the rest report `skipped`.
          readOnly: true
          x-terraform-computed: true
        run_status:
          anyOf:
            - type: string
              enum:
                - success
                - failure
            - type: 'null'
          title: Run Status
          description: >-
            Whether this partition's evaluation completed. Null on runs recorded
            before partitions reported it.
          readOnly: true
          x-terraform-computed: true
        notification_sent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Notification Sent
          description: >-
            Whether this partition sent a notification. A partition can fire and
            send nothing when `notification_frequency_config` holds it back.
            Null on runs recorded before sends were tracked.
          readOnly: true
          x-terraform-computed: true
        trigger_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Trigger Value
          description: The value this partition's trigger evaluated.
          readOnly: true
          x-terraform-computed: true
        trigger_details:
          anyOf:
            - $ref: '#/components/schemas/MonitorRunTriggerDetails'
            - type: 'null'
          description: What this partition's value was measured against.
          readOnly: true
          x-terraform-computed: true
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Why this partition failed. Null unless it did.
          readOnly: true
          x-terraform-computed: true
      type: object
      required:
        - partition_value
        - trigger_status
      title: MonitorRunPartition
      description: How one partition of a partitioned monitor evaluated in a run.
    MonitorQuery-Output:
      properties:
        query_class:
          type: string
          enum:
            - OrgDailySpendQuery
            - OrgCustomWorkloadQueriesQuery
            - OrgDbtInvocationsQuery
            - OrgDbtQueriesProcessedQuery
            - OrgDynamicTableQueriesQuery
            - OrgFivetranQuery
            - OrgHexQueriesQuery
            - OrgHourlyServerlessSpendQuery
            - OrgDailyStorageSpendQuery
            - OrgStorageSummaryWithWorkloadsQuery
            - OrgLookerQueryQuery
            - OrgModeQueryQuery
            - OrgPeriscopeQueryQuery
            - OrgDailyQueryPatternQuery
            - OrgQueryHistoryEnrichedQuery
            - OrgDailyWorkloadQuery
            - OrgSigmaQueryQuery
            - OrgStoredProcedureQueriesQuery
            - OrgTaskQueriesQuery
            - OrgInsightsQuery
            - TableauDataSourcesQuery
            - TableauUsersQuery
            - TableauViewEventsQuery
            - TableauWorkbooksQuery
            - OrgDatabricksQueryHistoryEnrichedQuery
            - OrgDatabricksDailyQueryPatternQuery
            - OrgDatabricksHourlyWarehouseSummaryQuery
            - OrgDatabricksClusterSummaryQuery
            - OrgDatabricksHourlyJobTaskRunQuery
            - OrgDatabricksDbtQueriesProcessedQuery
            - OrgDatabricksDbtInvocationsQuery
            - OrgDatabricksDailyWorkloadQuery
            - OrgBigQueryDailyWorkloadQuery
            - OrgBigQueryHourlyWorkloadQuery
            - OrgBigQueryCustomWorkloadQueriesQuery
            - OrgBigQueryLookerQueriesQuery
            - OrgBigQueryDbtInvocationsQuery
            - OrgBigQueryDbtQueriesProcessedQuery
            - OrgBigQueryJobHistoryEnrichedQuery
            - OrgBigQueryDailyQueryPatternQuery
            - OrgBigQueryHourlyQueryPatternQuery
            - OrgBigQueryDailyProjectQuery
            - OrgBigQueryDailyReservationQuery
            - OrgBigQueryHourlyReservationQuery
            - OrgBigQueryDailyStorageSpendV2Query
            - OrgBigQueryStorageSummaryWithWorkloadsV2Query
          title: Query Class
          description: >-
            The semantic-layer query this monitor runs. Determines which
            `dimensions` and `measures` the query object may name, and must pair
            with the monitor's `data_source`.
          examples:
            - OrgDailySpendQuery
        query_object:
          $ref: '#/components/schemas/MonitorQueryObject-Output'
        period:
          anyOf:
            - $ref: '#/components/schemas/MonitorQueryPeriod'
            - type: 'null'
        compare_with:
          anyOf:
            - $ref: '#/components/schemas/MonitorQueryPeriod'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - query_class
        - query_object
      title: MonitorQuery
    BudgetThreshold:
      properties:
        metric:
          type: string
          enum:
            - actual_spend
            - forecast_spend
          title: Metric
        unit:
          type: string
          enum:
            - percent
            - amount
          title: Unit
        value:
          type: number
          title: Value
      additionalProperties: false
      type: object
      required:
        - metric
        - unit
        - value
      title: BudgetThreshold
      description: A single budget threshold.
    PartitionColumn:
      properties:
        title:
          type: string
          title: Title
      type: object
      required:
        - title
      title: PartitionColumn
    MonitorQueryObject-Output:
      properties:
        dimensions:
          items:
            anyOf:
              - type: string
              - $ref: '#/components/schemas/MonitorSemiStructuredDimension'
          type: array
          title: Dimensions
        measures:
          items:
            anyOf:
              - type: string
              - $ref: '#/components/schemas/MonitorSemiStructuredMeasure'
          type: array
          title: Measures
        filters:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Filters
        measure_filters:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Measure Filters
        sort:
          items:
            $ref: '#/components/schemas/MonitorSort-Output'
          type: array
          title: Sort
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
      additionalProperties: false
      type: object
      title: MonitorQueryObject
    MonitorQueryPeriod:
      properties:
        period:
          type: integer
          title: Period
        grain:
          type: string
          enum:
            - day
            - week
            - month
          title: Grain
        date_column:
          type: string
          title: Date Column
          default: day
        fill_missing_dates:
          type: boolean
          title: Fill Missing Dates
          default: false
      additionalProperties: false
      type: object
      required:
        - period
        - grain
      title: MonitorQueryPeriod
    MonitorSemiStructuredDimension:
      properties:
        field:
          type: string
          title: Field
        path:
          items:
            type: string
          type: array
          title: Path
      type: object
      required:
        - field
        - path
      title: MonitorSemiStructuredDimension
    MonitorSemiStructuredMeasure:
      properties:
        aggregate_function:
          type: string
          const: array_unique_agg
          title: Aggregate Function
        dimension:
          $ref: '#/components/schemas/MonitorSemiStructuredDimension'
      type: object
      required:
        - aggregate_function
        - dimension
      title: MonitorSemiStructuredMeasure
    MonitorSort-Output:
      properties:
        field:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/MonitorSemiStructuredDimension'
            - $ref: '#/components/schemas/MonitorSemiStructuredMeasure'
          title: Field
        direction:
          type: string
          enum:
            - asc
            - desc
          title: Direction
        column_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Column Key
      additionalProperties: false
      type: object
      required:
        - field
        - direction
      title: MonitorSort
      description: >-
        Mirrors `Sort[M, D]`, but over a plain string field.


        Monitor fields carry templated values and are only resolved against the
        query

        class at run time, so they cannot be the query class's dimension/measure
        enums.
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````