Skip to content

feat: add query_team_usage_stats API for multi-tenant metrics#195

Merged
daksh-r merged 2 commits intomasterfrom
feat/add-query-team-usage-stats-api
Feb 17, 2026
Merged

feat: add query_team_usage_stats API for multi-tenant metrics#195
daksh-r merged 2 commits intomasterfrom
feat/add-query-team-usage-stats-api

Conversation

@daksh-r
Copy link
Contributor

@daksh-r daksh-r commented Feb 16, 2026

Add query_team_usage_stats method for querying team-level usage statistics from the warehouse database.

  • Returns all 16 metrics grouped by team with cursor-based pagination
  • Supports monthly aggregation (month param) or daily breakdown (start_date/end_date)
  • Includes Sorbet type signatures and comprehensive test coverage

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Daksh and others added 2 commits February 16, 2026 10:11
Add query_team_usage_stats method for querying team-level usage
statistics from the warehouse database.

- Returns all 16 metrics grouped by team with cursor-based pagination
- Supports monthly aggregation (month param) or daily breakdown (start_date/end_date)
- Includes Sorbet type signatures and comprehensive test coverage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The API now returns shadowed=true when sending a message as a shadow
banned user. Updated test expectation to match current behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
text: 'Hello world'
}, @random_user[:id])
expect(response['message']['shadowed']).to eq(false)
expect(response['message']['shadowed']).to eq(true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daksh-r daksh-r merged commit 5ef2cc6 into master Feb 17, 2026
4 checks passed
@daksh-r daksh-r deleted the feat/add-query-team-usage-stats-api branch February 17, 2026 12:05
@github-actions github-actions bot mentioned this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments