openmeter icon indicating copy to clipboard operation
openmeter copied to clipboard

feat(api): query meters v2 with filters

Open tothandras opened this issue 6 months ago • 1 comments

Summary by CodeRabbit

  • New Features

    • Introduced an advanced JSON-based filter query parameter for meter queries, supporting flexible filtering on groupBy, subject, and time.
    • Added support for grouping by multiple keys with a new groupBy parameter.
    • Enhanced query endpoints to accept the new filter parameter with mutual exclusivity to simpler filters.
    • Improved parameter validation to enforce exclusive use of advanced filtering.
    • Added a new query path utilizing the advanced filtering capabilities.
  • Bug Fixes

    • Strengthened validation to prevent simultaneous use of conflicting filter parameters.
  • Tests

    • Added extensive tests covering SQL generation, filtering, grouping, and windowing scenarios for the new query parameters.
  • Documentation

    • Updated API specs and documentation to include the new filtering and grouping parameters.

tothandras avatar Apr 24 '25 10:04 tothandras