The Reporting API (v2alpha) provides a high-level interface for creating and managing cross-media measurement reports with automated metric calculations, scheduling, and aggregations.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/world-federation-of-advertisers/cross-media-measurement/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Reporting API simplifies measurement workflows by:- Automated metric calculations - Define metrics once, reuse across reports
- Report scheduling - Automatically generate recurring reports
- Flexible aggregations - Group metrics by time intervals and dimensions
- Batch operations - Create multiple metrics efficiently
- Result caching - Reuse metric results across reports
The Reporting API is built on top of the lower-level Measurement Consumer API, providing higher-level abstractions for common reporting workflows.
Core Services
Reports Service
Create and manage report resources:CreateReport- Generate a new reportGetReport- Retrieve report by resource nameListReports- List reports for a measurement consumer
Metrics Service
Manage individual metric resources:CreateMetric- Create a single metricBatchCreateMetrics- Create multiple metrics (up to 1000)GetMetric- Retrieve metric by resource nameBatchGetMetrics- Retrieve multiple metrics (up to 1000)ListMetrics- List metrics for a measurement consumerInvalidateMetric- Invalidate a cached metric result
Supporting Services
- ReportingSets - Manage collections of event groups
- MetricCalculationSpecs - Define reusable metric specifications
- ReportSchedules - Configure automated report generation
- EventGroups - Query available event groups
Reports
Report Resource
Resource nameFormat:
measurementConsumers/{measurement_consumer}/reports/{report}Map of reporting sets to metric calculation specsEach entry defines which metrics to calculate for a specific reporting set.
Time interval configuration (one of):
time_intervals- List of specific time rangesreporting_interval- Single interval with frequency subdivision
Report state (output only)Values:
RUNNING- Computation in progressSUCCEEDED- Completed successfullyFAILED- Computation failed
Calculated metric results (output only)Available when state is
SUCCEEDED or FAILED.Creating Reports
Listing Reports
Parent measurement consumerFormat:
measurementConsumers/{measurement_consumer}Maximum number of reports to return (default: 50, max: 1000)
Token from previous ListReports call for pagination
CEL expression filterExample:
state = 'SUCCEEDED' && create_time > timestamp('2024-01-01T00:00:00Z')Metrics
Metric Resource
Resource nameFormat:
measurementConsumers/{measurement_consumer}/metrics/{metric}Reporting set to calculate metric onFormat:
measurementConsumers/{measurement_consumer}/reportingSets/{reporting_set}Time range for metric calculation (cumulative)
Specification of what to calculateTypes:
reach, reach_and_frequency, impression_count, watch_duration, population_countAdditional event filters (combined with AND)
Metric state (output only)Values:
RUNNING- Computation in progressSUCCEEDED- Completed successfullyFAILED- Computation failedINVALID- Result invalidated after success
Calculated metric result (output only)
Metric Types
Reach
Count of unique users reached:Reach and Frequency
Reach with frequency distribution:Impression Count
Total impressions with differential privacy:Watch Duration
Total watch duration for video content:Batch Operations
Batch Create Metrics
Create up to 1000 metrics in a single request:Batch operations are atomic: all metrics succeed or all fail. This ensures consistency when creating multiple related metrics.
Batch Get Metrics
Retrieve up to 1000 metrics in a single request:Reporting Sets
A ReportingSet is a named collection of event groups used for metric calculations:Metric Calculation Specs
MetricCalculationSpec defines reusable metric configurations:Report Schedules
Automate report generation with schedules:Event Groups
Query available event groups before creating reports:Best Practices
Reuse metric calculation specs
Reuse metric calculation specs
Define metric calculation specs once and reference them across multiple reports to ensure consistency.
Use batch operations for multiple metrics
Use batch operations for multiple metrics
When creating metrics for multiple time intervals or reporting sets, use
BatchCreateMetrics for better performance.Leverage metric caching
Leverage metric caching
The system automatically caches metric results. Reusing the same metric configuration (reporting set + time interval + spec) across reports avoids redundant computations.
Tag reports for organization
Tag reports for organization
Use the
tags field to add metadata (campaign names, regions, etc.) that helps with filtering and organizing reports.Schedule recurring reports
Schedule recurring reports
For routine reporting needs, use ReportSchedules to automate report generation rather than manual API calls.
Monitor report state
Monitor report state
Implement polling with exponential backoff to check report state. Most reports complete within minutes.
Error Handling
Invalid metric specification or time intervalCommon causes:
- Time interval start is after end
- Privacy parameters out of valid range
- Invalid resource name format
Cannot create metric due to system stateCommon causes:
- Reporting set has no event groups
- Event groups not available for time interval
Too many concurrent metrics or reportsResolution: Implement rate limiting and retry with exponential backoff
Related APIs
Measurement Consumer API
Lower-level measurement creation
API Overview
Complete API architecture