Skip to content

docs(api): describe access rules for team filters, private resources and roles - #1071

Merged
ysyneu merged 1 commit into
mainfrom
docs/api-permission-behavior
Oct 17, 2026
Merged

ysyneu merged 1 commit into
mainfrom
docs/api-permission-behavior

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Documents updated access rules in the On-call, Platform, RUM and Monitors API references (EN and ZH, per-module specs plus the consolidated copy), and the pagination convention page.

  • Team and channel filters: is_my_team with team_ids that share no team with the caller, or a caller in no team, returns an empty result (/template/list, /insight/*, /schedule/list, /rum/application/list). /alert-event/list returns nothing when none of the sent channel_ids is accessible. /schedule/list with is_my_manage ignores team IDs outside the caller's teams.
  • Mapping APIs: headers is null in /enrichment/mapping/api/list and /info unless the caller can edit the API.
  • Pagination: has_next_page on /alert/list and /incident/list is exact in page-number mode past 1,000 rows; total stays capped.
  • Schedules / channels / calendars: /schedule/delete requires edit access to every schedule and fails with InternalError when the reference check cannot complete; drop-rule writes require Channels Manage; the 5-calendar limit applies to every member.
  • Roles: disabled roles grant no permissions (members and their app keys); built-in roles are rejected by upsert/enable/disable/delete; /role/upsert with an unknown role_id returns no role found by id and keeps a disabled role disabled.
  • RUM: private-application access enforced on /rum/application/infos, /rum/facet/count, session replay and issue info/update; /rum/application/webhook/test requires Applications Manage; replay segments not yet indexed return ResourceNotFound.
  • Monitors: SLS metadata and the Prometheus label-values proxy require query access to the datasource (unknown ID is 400); /monit/rule/v2/info requires access to the rule's folder.

Checks: scripts/lint_openapi.py, scripts/api_path_redirects.py --check, EN/ZH parity and consolidated-equality checks pass.

Merge after the corresponding backend release.

…and roles

- is_my_team / channel filters: an empty intersection with the caller's
  teams or accessible channels returns an empty result (alert events,
  templates, insights, schedules, RUM applications)
- mapping API headers are returned only to callers who can edit the API
- has_next_page on alert and incident lists stays exact past 1,000 rows
- schedule delete checks every schedule and fails on an incomplete
  reference check; drop rule writes require Channels Manage; the
  5-calendar limit applies to every member
- disabled roles grant no permissions; built-in roles are rejected by
  upsert/enable/disable/delete; upsert only updates roles of the account
- RUM private applications are enforced on batch get, facet count,
  session replay and issue detail/update; webhook test requires
  Applications Manage; replay segment not-yet-indexed error
- Monitors SLS metadata and Prometheus proxy require datasource query
  access; rule detail requires folder access
@ysyneu
ysyneu merged commit 9a5435b into main Oct 17, 2026
2 checks passed
@ysyneu
ysyneu deleted the docs/api-permission-behavior branch October 17, 2026 14:29
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.

1 participant