Skip to content

docs(api-reference): document the 9 RUM custom dashboard endpoints - #1077

Merged
ysyneu merged 2 commits into
mainfrom
api-review/20261019080820
Oct 19, 2026
Merged

ysyneu merged 2 commits into
mainfrom
api-review/20261019080820

Conversation

@flashduty

@flashduty flashduty Bot commented Oct 19, 2026

Copy link
Copy Markdown

api-review — --mode generate --scope all --auto

Baseline: flashduty-docs@08f8d09a (docs origin/main), sources read from each repo's origin/main
(fc-pgy@051165ca, fc-event@c86657206, fc-oncall@a7bd73d, fc-rum@6755d73,
fc-statuspage@cd4aa20, monit-webapi@d73080d, monit-edge@59c212a, fc-datasource@c533b9e,
go-pkg@fe26f4e, plus fc-safari@fb7df050 which --scope all also needs).

Operation changes per module

Module added updated removed
RUM 9 0 0
on-call 0 0 0
monitors 0 0 0
AI SRE (safari) 0 0 0
platform 0 0 0

The nine new operations are the RUM custom-dashboard console API, registered in the pgy registry
with Auth: "all" but never documented:

POST /rum/dashboard/{create,get,list,update,delete,restore,trash/list,revisions/list,revisions/get}

Handlers: fc-rum@origin/main → cmd/server/controller/dashboard/dashboard.go, routes in
cmd/server/routes.go:65-75 (dashboardG := restSrv.Engine.Group("/rum/dashboard/", cmd.BackAuth())).
Types: types/dashboard/contract.go, variants.go, validate.go; permission factor set
rumDashboard:write:{create,update,delete,restore} + rumDashboard:read:trashList
(fc-pgy/logic/permission/permission_test.go, entry id 2012 "Dashboards Manage" / class "Insights",
scope rum).

New tag/folder RUM/Dashboards (RUM/仪表盘), new nav subgroup Dashboards / 仪表盘 inserted
after the RUM Data query group in both language trees, 50 new schemas
(RumDashboard*), and rows in both api-catalog.mdx files.

Registry ↔ docs reconciliation

380 public registry rows (auth == "all", non-/event/push/) vs 370 documented operations before
this round. The gap was exactly ten paths:

  • the nine /rum/dashboard/* above — added by this PR;
  • POST /channel/incident/daily-counts — still unresolved, see below.

After this PR: 379 documented operations, 380 registry rows, difference = the one unresolved path.

Unresolved (not written to any spec)

  • POST /channel/incident/daily-counts (channel:read:incidentDailyCounts, Auth: "all").
    No handler and no route on fc-event@origin/main (git grep over cmd/**, logic/** returns
    nothing); cmd/server/routes.go on origin/dev still carries the route. Same finding as the
    2026-10-12/10-15 rounds — needs a handler shipped or the registry Auth changed.

Recorded, deliberately not changed

  1. /monit/folder/{health,create,update,delete,move} moved from Auth: "jwt" to Auth: "all" in
    this window (fc-pgy@e80eec47). All five are already documented, so no spec change is needed —
    noted because the surface they belong to is now app_key-callable.
  2. /monit/dashboard/panel/{preview,run} account quota changed AQps: 16 → 32 in the same commit.
    The published rate-limit cells are a separate, systemic caliber question (147 mismatches against
    the registry as of the 2026-10-12 sweep) and are not fixed piecemeal here.
  3. DutyError differs between the split specs and the consolidated copies (consolidated carries
    reason, splits do not). That is a hand edit marked x-flashduty-preserve-absence: true; left
    untouched per the standing convention.
  4. components.responses in the safari split keep their safari-specific BadRequest example
    (skill_id); intentional customization, unchanged.

Pre-existing count drift corrected in both catalogs

en/zh api-catalog.mdx declared 372 endpoints, while the specs held 370. The AI SRE
accordion says 55 while its spec and its own table both have 53 rows (/safari/* specs contain 53
operations, all 53 listed). This PR sets AI SRE to 53, RUM 41 → 50, and the total to 379.

Examples

api-dev.flashcat.cloud is not reachable from this environment (no FLASHDUTY_APP_KEY), so all
nine request and response examples are constructed
from the Go types: canonical UUIDv7 IDs,
qLpu24Dz4CAzWsESPbJYWA reused from the existing RUM application examples, Unix-millisecond
timestamps, and a coherent two-panel dashboard body shared by create/update/get/revisions. They are
schema-valid (required fields present, enums honoured) but not captured from a live call.

Diff discipline

  • Every file was rebuilt from the committed blob (git show HEAD:<path>) after verifying that
    json.dumps(json.loads(blob), ensure_ascii=False, indent=2) + "\n" reproduces the blob byte for
    byte (trailing newline verified per file), so only intended changes can appear.
  • Old-versus-new structural walk reports exactly 60 deltas per spec file: 50 added schemas, 9 added
    paths, 1 added tag — no removals, no changes to existing keys, values or ordering.
  • git diff --diff-algorithm=patience (also histogram/minimal) shows 3876 / 0 per spec file —
    pure insertions. The default Myers diff mis-aligns this file into ~11k deleted lines; please
    review with --diff-algorithm=patience.
  • docs.json: +30 lines, two nav subgroups only; no reordering.
  • Rule 1 minimal-diff: this round adds new endpoints, so the "<100 lines when no endpoint is added"
    budget does not apply.

Validation

  • All four spec files parse (json.load), paths 50/50/379/379, schemas 153/153/881/881.
  • EN/ZH structural parity: no drift across the 50 new schemas (only description /
    x-enumDescriptions differ, as intended). Examples are identical in both languages.
  • No dangling $ref (schemas or responses) in any of the four files.
  • Every path in every module is reachable from docs.json and from both api-catalog.mdx files
    (NAV MISSING: none, catalog missing: none).
  • Unix time fields carry Unix timestamp in milliseconds (created_at, updated_at,
    deleted_at, revision created_at); duration fields (min_step_seconds) deliberately do not.
  • mint broken-links could not be run (mint is not installed here). Only existing paths were
    edited and new links point at generated operationId slugs; the nav/catalog coverage check above
    is the substitute evidence.

Skill gap worth fixing

skills/api-review/mapping.yaml has no rum/dashboard scope, so a strict --scope all run maps
these nine rows to no module and silently skips them (same failure mode as the on-call/calendar
provider mismatch recorded on 2026-10-15). This run used a local scope definition
(provider rum, repo fc-rum, paths controller/dashboard, logic/dashboard, types/dashboard,
tag RUM/Dashboards). The mapping file is not modified by this PR — it needs an owner decision.

flashduty-bot and others added 2 commits October 19, 2026 08:08
Add the nine app_key-callable /rum/dashboard/* operations generated from
fc-rum main (cmd/server/controller/dashboard + types/dashboard), and
reconcile the RUM nav group and both API catalogs.
… and examples

Fix write rate limits, decimals range, restore/delete revision semantics and
example revisions, list query matching, query argument requirements, and
panel/variable validation limits. Document 404/409/410/413/422 responses, align
the zh pages with the zh template and the console term, and add redirects for
the new dashboard paths.
@ysyneu
ysyneu merged commit 5323742 into main Oct 19, 2026
2 checks passed
@ysyneu
ysyneu deleted the api-review/20261019080820 branch October 19, 2026 11:54
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