> ## 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.

# Query insight activity by dimension and measure

> Returns one row per combination of the requested dimensions, carrying the requested measures. Each row is keyed by dimension and measure name. Activity is recorded per changed field, so an edit that changes several fields of an insight at once counts once for each. A view is recorded when it changes who last viewed the insight, so a repeat view by its last viewer adds no activity. `row_count` is the number of rows in `items`: results are not paginated, so an aggregation with more rows than `limit` is cut short at `limit` rather than continued under a `page_token`. Requires access to the audit log as well as to insights.



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json post /insights/activity/actions/query
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:
  /insights/activity/actions/query:
    post:
      tags:
        - insights
      summary: Query insight activity by dimension and measure
      description: >-
        Returns one row per combination of the requested dimensions, carrying
        the requested measures. Each row is keyed by dimension and measure name.
        Activity is recorded per changed field, so an edit that changes several
        fields of an insight at once counts once for each. A view is recorded
        when it changes who last viewed the insight, so a repeat view by its
        last viewer adds no activity. `row_count` is the number of rows in
        `items`: results are not paginated, so an aggregation with more rows
        than `limit` is cut short at `limit` rather than continued under a
        `page_token`. Requires access to the audit log as well as to insights.
      operationId: query_insight_activity_route_insights_activity_actions_query_post
      parameters:
        - 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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightActivityQuery'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_dict_str__Any__'
        '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'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    InsightActivityQuery:
      properties:
        measures:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/SemiStructuredMeasure_InsightActivityDimensionName_
              - $ref: '#/components/schemas/InsightActivityMeasureName'
          type: array
          title: Measures
        dimensions:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
              - $ref: '#/components/schemas/InsightActivityDimensionName'
          type: array
          title: Dimensions
        filters:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/InFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/ArrayContainsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/IsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/LikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/MultiLikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/EqFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/FilterExpression_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/InRelativeDateRangeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
          type: array
          title: Filters
        filter_expression:
          anyOf:
            - $ref: >-
                #/components/schemas/FilterExpression_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
            - type: 'null'
        measure_filters:
          items:
            anyOf:
              - $ref: '#/components/schemas/InFilter_InsightActivityMeasureName_'
              - $ref: >-
                  #/components/schemas/ArrayContainsFilter_InsightActivityMeasureName_
              - $ref: '#/components/schemas/IsFilter_InsightActivityMeasureName_'
              - $ref: '#/components/schemas/LikeFilter_InsightActivityMeasureName_'
              - $ref: >-
                  #/components/schemas/MultiLikeFilter_InsightActivityMeasureName_
              - $ref: '#/components/schemas/EqFilter_InsightActivityMeasureName_'
              - $ref: >-
                  #/components/schemas/FilterExpression_InsightActivityMeasureName_
              - $ref: >-
                  #/components/schemas/InRelativeDateRangeFilter_InsightActivityMeasureName_
          type: array
          title: Measure Filters
        sort:
          items:
            $ref: >-
              #/components/schemas/Sort_InsightActivityMeasureName_InsightActivityDimensionName_
          type: array
          title: Sort
        limit:
          type: integer
          maximum: 10000
          minimum: 1
          title: Limit
          description: >-
            Maximum rows to return, at most 10000. An aggregation that produces
            more rows than this is silently cut short at the limit, so narrow
            the filters or group by fewer dimensions rather than raising it to
            see everything.
          default: 10000
      additionalProperties: false
      type: object
      title: InsightActivityQuery
      description: >-
        An aggregate query over the activity on insights.


        Each activity record is one change to one insight field: a view, or an
        edit to its

        status, assignee, effort or savings estimate. A view is recorded when it
        changes

        who last viewed the insight, so a repeat view by its last viewer adds no
        record. Group with `dimensions`, aggregate

        with `measures`, narrow rows with `filters` or `filter_expression`, and
        narrow

        aggregates with `measure_filters`. The `action_*` and `actor` dimensions
        describe

        the change; every other dimension describes the insight it was made to.
        Rows are

        already limited to the insights the caller may see.
    ListResponse_dict_str__Any__:
      properties:
        items:
          items:
            additionalProperties: true
            type: object
          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: ListResponse[dict[str, Any]]
    SemiStructuredMeasure_InsightActivityDimensionName_:
      properties:
        aggregate_function:
          type: string
          const: array_unique_agg
          title: Aggregate Function
        dimension:
          $ref: >-
            #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
      type: object
      required:
        - aggregate_function
        - dimension
      title: SemiStructuredMeasure[InsightActivityDimensionName]
    InsightActivityMeasureName:
      type: string
      enum:
        - count
        - num_insights
        - num_actors
      title: InsightActivityMeasureName
    SemiStructuredDimension_InsightActivityDimensionName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityDimensionName'
        path:
          items:
            type: string
          type: array
          title: Path
      type: object
      required:
        - field
        - path
      title: SemiStructuredDimension[InsightActivityDimensionName]
    InsightActivityDimensionName:
      type: string
      enum:
        - action
        - action_field
        - action_old_value
        - action_new_value
        - actor
        - action_time
        - action_day
        - audit_log_id
        - identifying_metadata
        - aggregate_metadata
        - insight_metadata
        - insight_type
        - collapsed_insight_type
        - resource_type
        - nice_resource_type
        - aggregate_resource_type
        - effort
        - effort_sort_index
        - user_effort
        - effective_effort
        - effective_effort_sort_index
        - status
        - assignee
        - connection_id
        - is_current
        - is_dismissed
        - account_metadata
        - sf_account
        - sf_org
        - usage_groups
        - usage_group
        - connection_type
        - platform_organization
        - platform_instance
        - platform_instance_name
        - snowflake_account_name
        - snowflake_org_name
        - databricks_account_id
        - databricks_workspace_id
        - first_generated_at
        - first_generated_day
        - last_generated_at
        - first_viewed_at
        - last_viewed_at
        - first_viewed_by
        - last_viewed_by
        - view_count
        - updated_at
        - updated_by
        - studied_period_start
        - studied_period_end
        - annualized_resource_cost
        - executions_30d
        - studied_period_days
        - latest_query_start_time
        - avg_utilization_pct_all_purpose_auto_terminate_disabled
        - avg_utilization_pct_auto_suspend_disabled
        - idle_spend_7d_all_purpose_auto_terminate_disabled
        - idle_spend_7d_auto_suspend_disabled
        - idle_spend_7d_reduce_minimum_cluster_count
        - avg_cpu_percent
        - avg_mem_percent
        - total_active_cost_7d
        - autoscale_spend_30d
        - >-
          avoidable_autoscale_slot_hours_30d_bigquery_reservation_consolidate_admin_projects
        - >-
          avoidable_autoscale_slot_hours_30d_bigquery_reservation_use_committed_idle_slots
        - estimated_savings_upper_bound_30d
        - latest_current_monthly_forecast
        - latest_recommended_monthly_forecast
        - allocated_actual_cost_30d
        - confidence
        - on_demand_cost_30d
        - actual_cost_30d
        - has_existing_reservation
        - reservation_cost_30d_high
        - reservation_cost_30d_low
        - annualized_failsafe_cost
        - annualized_time_travel_cost
        - time_travel_retention_days
        - cluster_count_databricks_jobs_enable_autoscaling
        - cluster_count_databricks_jobs_oversized_driver
        - cluster_count_databricks_jobs_oversized_workers
        - cluster_count_databricks_jobs_reduce_min_worker_count
        - reclaimable_minutes_databricks_jobs_enable_autoscaling
        - reclaimable_minutes_databricks_jobs_reduce_min_worker_count
        - runs_in_window_databricks_jobs_enable_autoscaling
        - runs_in_window_databricks_jobs_oversized_driver
        - runs_in_window_databricks_jobs_oversized_workers
        - runs_in_window_databricks_jobs_reduce_min_worker_count
        - failed_runs
        - count_guilty_queries_databricks_workloads_high_disk_spill
        - count_guilty_queries_high_remote_spillage_workload
        - sum_spilled_local_bytes
        - executions_7d
        - failed_executions
        - executions_frequent_dml_workload_with_small_updates
        - executions_high_cloud_services_cost
        - executions_high_run_frequency_workload
        - executions_poor_pruning_workload
        - rows_affected
        - studied_period_cost_frequent_dml_workload_with_small_updates
        - studied_period_cost_high_run_frequency_workload
        - written_rows
        - cloud_services_cost
        - count_non_incremental_runs
        - ctas_replace_runs
        - total_runs
        - write_truncate_runs
        - percentage_queries_with_inefficient_warehouse_size
        - percentage_queries_with_low_partition_scanning
        - current_spend_7d
        - estimated_serverless_spend_7d
        - execution_ratio
        - recommended_warehouse_size
        - sum_compute_cost_under_5s
        - warehouse_size
        - current_min_cluster_count
        - min_clusters
        - annualized_dml_cost
        - annualized_storage_cost
        - nice_identifying_metadata
        - id
        - snowflake_id
        - annualized_potential_savings_lower_bound
        - annualized_potential_savings_upper_bound
        - user_annualized_potential_savings_lower_bound
        - user_annualized_potential_savings_upper_bound
        - effective_annualized_potential_savings_lower_bound
        - effective_annualized_potential_savings_upper_bound
      title: InsightActivityDimensionName
    InFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            anyOf:
              - $ref: '#/components/schemas/EqValue'
              - $ref: '#/components/schemas/DictValue'
          type: array
          title: Values
        operator:
          type: string
          enum:
            - in
            - not in
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: >-
        InFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    ArrayContainsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            anyOf:
              - $ref: '#/components/schemas/EqValue'
              - $ref: '#/components/schemas/DictValue'
          type: array
          title: Values
        operator:
          type: string
          const: array_contains
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: >-
        ArrayContainsFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    IsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: 'null'
          title: Value
        operator:
          type: string
          enum:
            - is
            - is not
          title: Operator
      type: object
      required:
        - field
        - operator
      title: >-
        IsFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    LikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: string
          title: Value
        operator:
          type: string
          enum:
            - ilike
            - startswith
            - array_contains_prefix
            - array_contains_substring
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: >-
        LikeFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    MultiLikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            type: string
          type: array
          title: Values
        operator:
          type: string
          enum:
            - ilike
            - startswith
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: >-
        MultiLikeFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    EqFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        value:
          anyOf:
            - $ref: '#/components/schemas/EqValue'
            - $ref: '#/components/schemas/DictValue'
          title: Value
        operator:
          type: string
          enum:
            - '>'
            - '>='
            - <
            - <=
            - '='
            - '!='
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: >-
        EqFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    FilterExpression_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        operator:
          type: string
          enum:
            - and
            - or
          title: Operator
        filters:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/FilterExpression_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/EqFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/InFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/ArrayContainsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/IsFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/LikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/MultiLikeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
              - $ref: >-
                  #/components/schemas/InRelativeDateRangeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__
          type: array
          title: Filters
        component_type:
          anyOf:
            - type: string
              const: Resource Filter
            - type: 'null'
          title: Component Type
      type: object
      required:
        - operator
        - filters
      title: >-
        FilterExpression[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    InRelativeDateRangeFilter_Union_SemiStructuredDimension_InsightActivityDimensionName___InsightActivityDimensionName__:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
          title: Field
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: string
          title: Value
        operator:
          type: string
          enum:
            - in range
            - not in range
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: >-
        InRelativeDateRangeFilter[Union[SemiStructuredDimension[InsightActivityDimensionName],
        InsightActivityDimensionName]]
    InFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            anyOf:
              - $ref: '#/components/schemas/EqValue'
              - $ref: '#/components/schemas/DictValue'
          type: array
          title: Values
        operator:
          type: string
          enum:
            - in
            - not in
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: InFilter[InsightActivityMeasureName]
    ArrayContainsFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            anyOf:
              - $ref: '#/components/schemas/EqValue'
              - $ref: '#/components/schemas/DictValue'
          type: array
          title: Values
        operator:
          type: string
          const: array_contains
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: ArrayContainsFilter[InsightActivityMeasureName]
    IsFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: 'null'
          title: Value
        operator:
          type: string
          enum:
            - is
            - is not
          title: Operator
      type: object
      required:
        - field
        - operator
      title: IsFilter[InsightActivityMeasureName]
    LikeFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: string
          title: Value
        operator:
          type: string
          enum:
            - ilike
            - startswith
            - array_contains_prefix
            - array_contains_substring
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: LikeFilter[InsightActivityMeasureName]
    MultiLikeFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        values:
          items:
            type: string
          type: array
          title: Values
        operator:
          type: string
          enum:
            - ilike
            - startswith
          title: Operator
      type: object
      required:
        - field
        - values
        - operator
      title: MultiLikeFilter[InsightActivityMeasureName]
    EqFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        value:
          anyOf:
            - $ref: '#/components/schemas/EqValue'
            - $ref: '#/components/schemas/DictValue'
          title: Value
        operator:
          type: string
          enum:
            - '>'
            - '>='
            - <
            - <=
            - '='
            - '!='
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: EqFilter[InsightActivityMeasureName]
    FilterExpression_InsightActivityMeasureName_:
      properties:
        operator:
          type: string
          enum:
            - and
            - or
          title: Operator
        filters:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/FilterExpression_InsightActivityMeasureName_
              - $ref: '#/components/schemas/EqFilter_InsightActivityMeasureName_'
              - $ref: '#/components/schemas/InFilter_InsightActivityMeasureName_'
              - $ref: >-
                  #/components/schemas/ArrayContainsFilter_InsightActivityMeasureName_
              - $ref: '#/components/schemas/IsFilter_InsightActivityMeasureName_'
              - $ref: '#/components/schemas/LikeFilter_InsightActivityMeasureName_'
              - $ref: >-
                  #/components/schemas/MultiLikeFilter_InsightActivityMeasureName_
              - $ref: >-
                  #/components/schemas/InRelativeDateRangeFilter_InsightActivityMeasureName_
          type: array
          title: Filters
        component_type:
          anyOf:
            - type: string
              const: Resource Filter
            - type: 'null'
          title: Component Type
      type: object
      required:
        - operator
        - filters
      title: FilterExpression[InsightActivityMeasureName]
    InRelativeDateRangeFilter_InsightActivityMeasureName_:
      properties:
        field:
          $ref: '#/components/schemas/InsightActivityMeasureName'
        not:
          type: boolean
          title: Not
          default: false
        value:
          type: string
          title: Value
        operator:
          type: string
          enum:
            - in range
            - not in range
          title: Operator
      type: object
      required:
        - field
        - value
        - operator
      title: InRelativeDateRangeFilter[InsightActivityMeasureName]
    Sort_InsightActivityMeasureName_InsightActivityDimensionName_:
      properties:
        field:
          anyOf:
            - $ref: >-
                #/components/schemas/SemiStructuredDimension_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityDimensionName'
            - $ref: >-
                #/components/schemas/SemiStructuredMeasure_InsightActivityDimensionName_
            - $ref: '#/components/schemas/InsightActivityMeasureName'
          title: Field
        direction:
          type: string
          enum:
            - asc
            - desc
          title: Direction
      type: object
      required:
        - field
        - direction
      title: Sort[InsightActivityMeasureName, InsightActivityDimensionName]
    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
    EqValue:
      anyOf:
        - type: integer
        - type: number
        - type: boolean
        - type: string
        - type: string
          format: date
        - type: 'null'
    DictValue:
      additionalProperties:
        anyOf:
          - $ref: '#/components/schemas/EqValue'
          - items:
              $ref: '#/components/schemas/EqValue'
            type: array
      type: object
  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'
    Conflict:
      description: Conflict
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.