Add on-call pages list command#641
Draft
nadimchakra wants to merge 1 commit into
Draft
Conversation
pup could only create or get-an-on-call-page-by-id; there was no way to list pages for a team or responder. This adds `on-call pages list`, filling that gap. Filtering is by team handle server-side (`filter=team:<handle>`) and by responder user id client-side, since the API exposes no responder facet. Uses `client::raw_get` against the unstable endpoint because `datadog-api-client` has no list binding and the stable `/api/v2/on-call/pages` GET returns an empty collection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Companion issue documenting the API-side gap and the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
on-call pages list, filling the gap where pup could onlycreateorget <page_id>an on-call page — there was no way to list pages for a team or responder. Filters by team handle server-side (filter=team:<handle>) and by responder user id client-side.Notable Changes
src/commands/on_call.rs:pages_list(cfg, team, responder, page_size)viaclient::raw_get(same pattern aspages_get), plus apage_has_responderhelper for the client-side responder filter.src/main.rs:Listvariant onOnCallPagesActionswith--team,--responder,--page-size; wired into routing. Verb-based classification makes it read-only.docs/COMMANDS.md: on-call row updated topages (list, get, create).Implementation notes
unstable/on-call/pagesendpoint deliberately:datadog-api-clientexposes no list binding, and the stableGET /api/v2/on-call/pagesreturns an empty200(content-length: 0) even with a filter. See the companion issue for the API-side gap.--responderis applied client-side because the endpoint has no responder facet (responders:,responder:,user:,target:all return zero results).on_call_readis already indefault_scopes()/read_only_scopes(), so no auth change is needed.Known limitations (inherited from the endpoint)
page[number]/page[offset]ignored — always oldest-first, page 1), no in-query time filter.page[size]caps at 1000, so teams with >1000 total pages can't retrieve recent ones via this command. These are API-side and tracked in the companion issue.Draft: opened to let CI validate the build — I couldn't compile locally (corporate crates.io mirror was missing
russh 0.61.1).🤖 Generated with Claude Code