• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 18565438923 / 1
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-438-remove-briefcase-creation-api
DEFAULT BRANCH: master
Ran 16 Oct 2025 03:26PM UTC
Files 874
Run time 25s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Oct 2025 02:52PM UTC coverage: 78.881% (+0.003%) from 78.878%
18565438923.1

push

github

web-flow
feat(api): add filtering and ordering support for `/api/v2/user-reports` endpoint DEV-287 DEV-233 (#6342)

### 📣 Summary
Adds robust filtering and ordering capabilities to the
`/api/v2/user-reports` API endpoint, enabling users and admins to query
large user datasets efficiently by date, usage metrics, and subscription
attributes, all backed by the optimized materialized view for scalable
performance on millions of records.

### 📖 Description
This PR introduces the filtering and ordering layer for the
`/api/v2/user-reports` endpoint, built on top of the existing
materialized view (`user_reports_userreportsmv`) that aggregates
user-level billing and usage data.

Also, added targeted indexes in `0003_add_user_reports_mv_indexes.py` on
high-cardinality numeric and timestamp columns to support range queries
without full table scans.

  Examples of usage:
  - Filter by username (case-insensitive, starts with):
    `/api/v2/user-reports/?q=username__icontains:raj`
  - Filter by email (case-insensitive, starts with):
      `/api/v2/user-reports/?q=email:kobo@example.com`

  - Filter by total storage bytes (greater than or equal to):
`/api/v2/user-reports/?q=service_usage__total_storage_bytes__gte:1`
  - Filter by total storage bytes (less than or equal to):
`/api/v2/user-reports/?q=service_usage__total_storage_bytes__lte:1`

---

Part of https://github.com/kobotoolbox/kpi/pull/6243

---------

Co-authored-by: RuthShryock <ruthieshryock@gmail.com>
Co-authored-by: Olivier Léger <olivierleger@gmail.com>

6853 of 11154 branches covered (61.44%)

26451 of 33533 relevant lines covered (78.88%)

0.79 hits per line

Source Files on job 18565438923.1
  • Tree
  • List 874
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 18565438923
  • 71647049 on github
  • Prev Job for on main (#18562672376.1)
  • Next Job for on main (#18571836905.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc