Skip to content

Conversation

@malwilley
Copy link
Member

@malwilley malwilley commented May 30, 2025

GET /organizations/<org_slug>/monitors-count/?project=1&environment=prod

{
  "counts": {
    "total": 4,
    "active": 3,
    "disabled": 1
  }
}

This endpoint is necessary because we want to display the number of active cron monitors from the issues page. Current endpoints are paginated and fetch more information than necessary.

LMK if this is not the right url or response format or if I'm doing anything else wrong. There doesn't seem to be a standard way of setting up count endpoints AFAICT.

@malwilley malwilley requested a review from evanpurkhiser May 30, 2025 18:49
@malwilley malwilley requested review from a team as code owners May 30, 2025 18:49
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 30, 2025
@malwilley malwilley enabled auto-merge (squash) May 30, 2025 19:00
@malwilley malwilley merged commit 8fb88cb into master May 30, 2025
64 checks passed
@malwilley malwilley deleted the malwilley/feat/cron-monitor-count-endpoint branch May 30, 2025 19:08
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 96.61017% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...tors/endpoints/organization_monitor_index_count.py 93.75% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #92574   +/-   ##
=======================================
  Coverage   87.89%   87.89%           
=======================================
  Files       10236    10238    +2     
  Lines      586985   587058   +73     
  Branches    22805    22805           
=======================================
+ Hits       515935   516002   +67     
- Misses      70620    70626    +6     
  Partials      430      430           

jan-auer added a commit that referenced this pull request Jun 2, 2025
* master: (249 commits)
  feat(source-maps): Do not show pagination together with empty state (#92287)
  ref(project-creation): Introduce useCreateProjectRules hook (#92186)
  feat(agent-insights): Handle new keys (#92613)
  feat(source-maps): Introduce new empty state copies and react-native callout (#92286)
  ref(issues): Remove project from group activity type (#92600)
  feat(ourlogs): Use /trace-logs endpoint (#92577)
  feat(issues): Only update group hasSeen when user is member (#92597)
  fix(workflow_engine): Graceful Data Condition Eval Handling (#92591)
  feat(uptime): Implement detector handler (#91107)
  chore(autofix): Remove logs from response payload (#92589)
  fix(search): Fix issue with tags name 'constructor' (#92586)
  fix(autofix): Fix condition for onboarding check (#92584)
  fix(ourlogs): Return the same format as /events & limit 1000 for trace-logs (#92580)
  fix(autofix): Fix automation onboarding condition (#92579)
  feat(explore): Remove group by timestamp from explore (#92546)
  feat(trace-items): Autocomplete for semver attributes (#92515)
  feat(processing) Define EventProcessingStore.__all__ (#92555)
  feat(autofix): Better errored state (#92571)
  chore(autofix): Seer beta banner copy changes (#92576)
  feat(crons): Add endpoint to return counts by status (#92574)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants