---
title: "Query aggregated waterfall"
method: POST
path: "/api/v2/rum/query/insight/aggregated_waterfall"
tags: ["RUM Insights"]
---

# Query aggregated waterfall

`POST /api/v2/rum/query/insight/aggregated_waterfall`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/rum/query/insight/aggregated_waterfall`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Get aggregated network resource waterfall data for a RUM view, sampled across multiple view instances.

## Request body

- AggregatedWaterfallRequest: Request body for the aggregated waterfall endpoint.
  - `data` AggregatedWaterfallRequestData, required: Data envelope for an aggregated waterfall request.
    - `attributes` AggregatedWaterfallRequestAttributes, required: Attributes for an aggregated waterfall query.
      - `application_id` string, required: The RUM application ID to analyze.
      - `criteria` AggregatedWaterfallPerformanceCriteria: Performance criteria to filter view instances by a metric threshold.
        - `max` number, double: Maximum threshold in seconds (inclusive).
        - `metric` 'loading_time' | 'largest_contentful_paint' | 'first_contentful_paint' | 'interaction_to_next_paint', required: Performance metric used to filter view instances by threshold.
        - `min` number, double: Minimum threshold in seconds (inclusive).
      - `filter` string: RUM query string to filter events (for example, @session.type:user @geo.country:US).
      - `from` integer, required: Start of the time range as a Unix timestamp in seconds.
      - `include_global_appearance` boolean: When true, enriches each resource with cross-view appearance statistics.
      - `sample_size` integer, required: Number of view instances to sample, between 1 and 500.
      - `to` integer, required: End of the time range as a Unix timestamp in seconds.
      - `view_name` string, required: The RUM view name to analyze (for example, /account/login).
    - `type` 'aggregated_waterfall', required: The JSON:API type for aggregated waterfall requests.

## Response `201`

Successful response

- AggregatedWaterfallResponse: Response body for the aggregated waterfall endpoint.
  - `data` AggregatedWaterfallResponseData, required: Data envelope for an aggregated waterfall response.
    - `attributes` AggregatedWaterfallResponseAttributes, required: Attributes of an aggregated waterfall response.
      - `application_id` string, required: The RUM application ID that was analyzed.
      - `criteria` AggregatedWaterfallPerformanceCriteria: Performance criteria to filter view instances by a metric threshold.
        - `max` number, double: Maximum threshold in seconds (inclusive).
        - `metric` 'loading_time' | 'largest_contentful_paint' | 'first_contentful_paint' | 'interaction_to_next_paint', required: Performance metric used to filter view instances by threshold.
        - `min` number, double: Minimum threshold in seconds (inclusive).
      - `from` integer, required: Start of the analyzed time range as a Unix timestamp in seconds.
      - `resources` AggregatedResource[], required: Network resources in chronological waterfall order.
        - `avg_duration_ms` number, double, required: Average total duration in milliseconds.
        - `avg_start_time_ms` number, double, required: Average start time relative to view start in milliseconds.
        - `cache_hit_rate_pct` number, double, required: Cache hit rate as a percentage.
        - `cached_count` integer, required: Number of requests served from cache.
        - `downloaded_count` integer, required: Number of requests downloaded from the network.
        - `global_p75_duration_ms` number, double: 75th percentile duration across all view names in the application, present when include_global_appearance is true.
        - `global_view_name_count` integer: Number of distinct view names in the application that load this resource, present when include_global_appearance is true.
        - `global_view_name_pct` number, double: Percentage of distinct view names in the application that load this resource, present when include_global_appearance is true.
        - `http_method` string, nullable, required: HTTP method for the resource request.
        - `load_frequency_pct` number, double, required: Percentage of sampled view instances that loaded this resource.
        - `max_duration_ms` number, double, required: Maximum duration in milliseconds.
        - `median_duration_ms` number, double, required: Median duration in milliseconds.
        - `min_duration_ms` number, double, required: Minimum duration in milliseconds.
        - `p75_duration_ms` number, double, required: 75th percentile duration in milliseconds.
        - `p95_duration_ms` number, double, required: 95th percentile duration in milliseconds.
        - `resource_type` string, nullable, required: Resource type (JS, CSS, image, fetch, XHR, document, and so on).
        - `resource_url_path_group` string, required: URL path group used to aggregate similar resources.
        - `timing_breakdown` AggregatedResourceTimingBreakdown, required: Average timing breakdown per network phase for a resource.
          - `avg_connect_ms` number, double, required: Average TCP connect duration in milliseconds.
          - `avg_dns_ms` number, double, required: Average DNS resolution duration in milliseconds.
          - `avg_download_ms` number, double, required: Average download phase duration in milliseconds.
          - `avg_first_byte_ms` number, double, required: Average time to first byte in milliseconds.
          - `avg_redirect_ms` number, double, required: Average redirect phase duration in milliseconds.
          - `avg_ssl_ms` number, double, required: Average SSL handshake duration in milliseconds.
        - `total_requests` integer, required: Total number of requests for this resource across all sampled views.
        - `views_with_resource` integer, required: Number of sampled view instances that loaded this resource.
      - `sampled_view_ids` string[], required: List of RUM view IDs sampled for this aggregation, capped at 50.
      - `to` integer, required: End of the analyzed time range as a Unix timestamp in seconds.
      - `total_cache_hit_rate_pct` number, double, required: Overall cache hit rate across all sampled views.
      - `view_count` integer, required: Number of view instances included in the analysis.
      - `view_name` string, required: The RUM view name that was analyzed.
    - `id` string, required: Hash-based unique identifier for this aggregation.
    - `type` 'aggregated_waterfall', required: The JSON:API type for aggregated waterfall requests.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
