You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(api): correct the admin API reference against the v2 contract - #3041
Several admin API docs describe behaviour the v2 server doesn't have. A client written from them would send node and dashboard layout writes without If-Match and get 428, branch on v1 error codes (400 bad_request, profile_limit_reached) that v2 never returns, expect server_layouts: true when v2 answers false, and assume every /api/v2/admin operation needs the admin role when ten don't. A few sections also still say v2 writes are bridge-only, though the v2 operations exist and the web uses them.
I found these by checking the nine docs/admin-*.md files against the handlers and contracts/api/v2/openapi.json at upstream d2c12dbb0, and rechecked each one against current main before editing. This PR corrects them. It changes docs only.
Approach
Where an early section of admin-api.md contradicted a later v2 section, I fixed the early text and linked to the v2 section rather than repeating it.
admin-api.md
Intro: names the admin routes that aren't admin-only (the metadata_curation item routes, an item-refresh owner reading their own job, the signed artifact download and the ticketed log socket).
Branding uploads: the v2 problem codes (422 validation_failed, 413 payload_too_large, 503 dependency_unavailable), with the v1 codes noted.
Nodes: 422 instead of 400, 409 for a conflicting URL, If-Match on PUT and DELETE, health_persisted on check, a string node_id and a fixed error summary on reprobe, and public_url is omitted rather than null.
Dashboard: layout saves need If-Match, a reset isn't safe to retry, server_layouts is false on v2 even though save and reset are served, and the layout read section no longer describes the legacy writer. /admin/stats gains advisory_titles, and the user_id examples are strings.
System resources: with available: false, gpu is still an empty array.
Sessions: the list limit maximum is 200 (100 is the summary's sample cap), and terminate takes a required JSON body.
Removed or repointed the sentences that said autoscan, dashboard layout and terminate writes were still bridge-only.
Bridge note: retiring /api/v1 is a separate maintainer decision, and /api/v1/health and /api/v1/ready keep answering, per docs/architecture/api-contract.md.
admin-settings-api.md: the web writes settings through the v2 PUT operations.
admin-users-api.md: v2 answers a full household with 409 conflict.
admin-tasks-api.md: database_maintenance also prunes device sign-in requests and OAuth sign-in flows.
admin-recommendations-api.md: the embeddings reset has two more 409 causes.
admin-system-api.md: attribution.disks is omitted when there are none.
Skipped: the dashboard layout read's undeclared nullable members and several operations' undeclared 409s are contract gaps a separate code PR is fixing, and the docs already describe the real behaviour there. No open PR changes the lines edited here (I checked #2306, #2349, #2525, #2765, #2772, #2781, #2810 and #2931).
Possible follow-up: some admin operations have no doc at all, including requestAdminServerRestart, the Jellyfin web install and remove operations, request settings and per-user request limits, /api/v2/admin/policy/*, section bulk, preview and capabilities, collection groups, and several collection writes (sync, MDBList import, item and order changes, backdrop and image).
Validation
make verify-local-paths: passes.
Links and anchors: every relative link and #anchor in the nine admin docs, and every inbound link to them from other docs, resolves.
Each changed claim was checked against contracts/api/v2/openapi.json, the internal/apiv2 handlers and the web callers at the branch base, 81d56ad65.
No tests, since this is a docs-only change. CI runs the documentation checks.
Evidence
Evidence: none, no user-visible change
Risks
None identified. Docs only.
Checklist
I read and can explain the complete diff.
This pull request addresses one concern.
Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
The Evidence section shows every change a user can see, or says there is none.
AI Disclosure
Harness: Claude Code (desktop app)
Tool(s): Claude Code, GitHub CLI
Model(s): claude-opus-5-5
Involvement: AI-assisted with Claude Opus. I directed the task and designed the work.
Adversarial review: a separate read-only Claude Opus reviewer got only the branch diff and tried to refute every changed claim against openapi.json, the internal/apiv2 handlers, the web callers and docs/architecture/api-contract.md. It also checked the new anchors, contradictions with the rest of each doc, and punctuation. It confirmed every status, type, limit and permission claim and found five wording problems, all fixed: the capabilities rule now names server_layouts as the exception, the v2 capability section no longer calls the layout lifecycle unavailable, a layout save can use the ETag from the previous save's 204 as well as the GET, node PUT also documents 409 for a URL that belongs to another node, and the reprobe error row describes v2's fixed summary. It also noted that the node update 422 carries no errors[] location, unlike the wire conventions. That's a handler question, so the docs still just say 422.
Note
Fix admin API reference docs to match the v2 contract
Corrects admin-api.md across many contracts: authorization rules for /api/v2/admin, error codes for asset uploads and node admin (422, 409, 413, 503), If-Match-guarded dashboard layout saves with 428/412 responses, and the v1 retirement policy (business routes return 410 Gone while /api/v1/health and /api/v1/ready stay served).
Raises the documented playback observation list limit from 100 to 200 and adds the advisory_titles statistics field.
Bring the admin API docs in line with the v2 handlers and
contracts/api/v2/openapi.json:
- admin-api.md: name the admin routes that are not admin-only; use the
v2 problem codes for branding uploads and node writes; document
If-Match on node PUT/DELETE and dashboard layout saves; add
health_persisted and advisory_titles; fix node_id, user_id and
public_url types; correct the session list limit, the resources
fields when no sample exists, server_layouts, the terminate body and
the v1 retirement note; drop sentences that still describe v2 writes
as bridge-only.
- admin-settings-api.md: the web writes settings through v2.
- admin-users-api.md: v2 answers a full household with 409 conflict.
- admin-tasks-api.md: database_maintenance also prunes device sign-in
requests and OAuth sign-in flows.
- admin-recommendations-api.md: list all three embeddings reset 409s.
- admin-system-api.md: attribution.disks is omitted when empty.
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 2 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Preserve optional store capabilities through production wrappers
Detach mandatory cleanup from request cancellation and bound its lifetime
This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ca283b7d-868f-4d02-b3d2-51dd696d7d73
Commits
Reviewing files that changed from the base of the PR and between 8a6ad91 and 67e74b7.
Files selected for processing: 1
docs/admin-recommendations-api.md
Walkthrough
The administrator API documentation now describes access exceptions, updated request and response contracts, dashboard layout writes, v2 web routes, and maintenance behavior.
Changes: Administrator API documentation
Layer / File(s)
Summary
Access and response contracts docs/admin-api.md, docs/admin-system-api.md, docs/admin-users-api.md
Documents access exceptions, error codes, node preconditions, and response-field representations. Examples use string user IDs and add an advisory-title count.
Web routes and sessions docs/admin-api.md, docs/admin-settings-api.md
Documents v2 settings and Autoscan connection writes, session termination and its required request body, and Autoscan callback, source, and list guidance.
Other administrator contracts docs/admin-recommendations-api.md, docs/admin-tasks-api.md, docs/admin-api.md
Updates documented embedding-reset conflicts, maintenance sweeps, and v1 retirement behavior. Health and readiness endpoints remain available after business-route retirement.
Silo-Server/silo-server#2908: The PR updates dashboard operation documentation but does not change the schema mismatch for layout and updated_at when no layout is saved.
Suggested reviewers:quick104
Merge Risk: Low · previous review 8a6ad
Clarify which saved embedding fields actually block reset; the remaining documentation updates are supported.
Security architecture risk: Minimal · up to 8a6ad
The changes clarify existing access controls and write-safety requirements without granting new privileges or changing server behavior. No material security risk was found to be introduced or worsened by this PR.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The reviewed access exceptions retain distinct scopes: delegated metadata access is checked against target libraries, non-administrator job reads are account-and-job-type constrained, artifact capabilities authorize one job, and log access remains tied to administrator session authority. The PR changes their description rather than their effective runtime exposure.
Trust Boundaries and Controls
observed — Metadata permission enforcement requires authentication and viewer access before the delegated gate. The middleware checks effective permissions and assigned libraries, installs a request-scoped authorizer, and the catalog guard rechecks complete target-library memberships under transaction locks.
observed — The v2 job-read handler allows non-administrators only their account's item-refresh jobs and hides other jobs with 404. The bridge handler's 403 behavior therefore does not contradict the documented v2 contract.
observed — Artifact access verifies an expiring signature against the requested job before opening its artifact. Log access separates administrator-authorized ticket minting from the socket handshake, consumes the ticket once, validates origin and authority before streaming, and periodically revalidates authority until connection expiry or cancellation.
Resilience and Maintainability Implications
inferred — Queued refresh and translation preserve creator and target provenance, but the inspected worker paths do not establish continuous permission reauthorization after admission. Whether revocation must stop already-authorized work remains an inherited policy uncertainty; this PR changes neither those workers nor their lifecycle.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title "docs(api): correct the admin API reference against the v2 contract" matches the changeset. The PR edits nine admin API docs to align them with the v2 OpenAPI contract and handlers, which is…
Description check
The description states the problem (admin API docs describe v2 behaviour the server does not have), lists the specific corrections across the admin docs (If-Match requirements, v2 error codes, server_…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "docs(api): correct the admin API reference against the v2 contract" matches the changeset. The PR edits nine admin API docs to align them with the v2 OpenAPI contract and handlers, which is the main change. The title is concise, specific, and follows a conventional commit style.
Full details: Description check
Explanation
The description states the problem (admin API docs describe v2 behaviour the server does not have), lists the specific corrections across the admin docs (If-Match requirements, v2 error codes, server_layouts value, admin-role exceptions, bridge-only claims), and gives the approach and validation. It matches the changeset in detail.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 5ddaf552-e95a-4e9d-b924-8830f048b73e
Commits
Reviewing files that changed from the base of the PR and between 3d9ea44 and 8a6ad91.
Files selected for processing: 2
docs/admin-api.md
docs/admin-recommendations-api.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 4 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Preserve optional store capabilities through production wrappers
Detach mandatory cleanup from request cancellation and bound its lifetime
Preserve durable media identity and share identity-evidence precedence
Bound decoder throughput trades and share direct-play eligibility
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
api-v2API v2 / Huma migration program (epic #135); long-running, stacked by phasedocumentationImprovements or additions to documentationpriority: P2Limited scope, workaround exists, or polishsize/M50–199 added + deleted lines (all files); change volume, not priority.
2 participants
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.
Problem
Related issue: N/A
Validation tasks: none
Several admin API docs describe behaviour the v2 server doesn't have. A client written from them would send node and dashboard layout writes without
If-Matchand get428, branch on v1 error codes (400 bad_request,profile_limit_reached) that v2 never returns, expectserver_layouts: truewhen v2 answersfalse, and assume every/api/v2/adminoperation needs the admin role when ten don't. A few sections also still say v2 writes are bridge-only, though the v2 operations exist and the web uses them.I found these by checking the nine
docs/admin-*.mdfiles against the handlers andcontracts/api/v2/openapi.jsonat upstreamd2c12dbb0, and rechecked each one against current main before editing. This PR corrects them. It changes docs only.Approach
Where an early section of
admin-api.mdcontradicted a later v2 section, I fixed the early text and linked to the v2 section rather than repeating it.admin-api.mdmetadata_curationitem routes, an item-refresh owner reading their own job, the signed artifact download and the ticketed log socket).422 validation_failed,413 payload_too_large,503 dependency_unavailable), with the v1 codes noted.422instead of400,409for a conflicting URL,If-Matchon PUT and DELETE,health_persistedon check, a stringnode_idand a fixederrorsummary on reprobe, andpublic_urlis omitted rather thannull.If-Match, a reset isn't safe to retry,server_layoutsisfalseon v2 even though save and reset are served, and the layout read section no longer describes the legacy writer./admin/statsgainsadvisory_titles, and theuser_idexamples are strings.available: false,gpuis still an empty array.limitmaximum is 200 (100 is the summary's sample cap), and terminate takes a required JSON body./api/v1is a separate maintainer decision, and/api/v1/healthand/api/v1/readykeep answering, perdocs/architecture/api-contract.md.admin-settings-api.md: the web writes settings through the v2 PUT operations.admin-users-api.md: v2 answers a full household with409 conflict.admin-tasks-api.md:database_maintenancealso prunes device sign-in requests and OAuth sign-in flows.admin-recommendations-api.md: the embeddings reset has two more409causes.admin-system-api.md:attribution.disksis omitted when there are none.Skipped: the dashboard layout read's undeclared nullable members and several operations' undeclared
409s are contract gaps a separate code PR is fixing, and the docs already describe the real behaviour there. No open PR changes the lines edited here (I checked #2306, #2349, #2525, #2765, #2772, #2781, #2810 and #2931).Possible follow-up: some admin operations have no doc at all, including
requestAdminServerRestart, the Jellyfin web install and remove operations, request settings and per-user request limits,/api/v2/admin/policy/*, section bulk, preview and capabilities, collection groups, and several collection writes (sync, MDBList import, item and order changes, backdrop and image).Validation
make verify-local-paths: passes.#anchorin the nine admin docs, and every inbound link to them from other docs, resolves.contracts/api/v2/openapi.json, theinternal/apiv2handlers and the web callers at the branch base,81d56ad65.Evidence
Evidence: none, no user-visible change
Risks
None identified. Docs only.
Checklist
AI Disclosure
openapi.json, theinternal/apiv2handlers, the web callers anddocs/architecture/api-contract.md. It also checked the new anchors, contradictions with the rest of each doc, and punctuation. It confirmed every status, type, limit and permission claim and found five wording problems, all fixed: the capabilities rule now namesserver_layoutsas the exception, the v2 capability section no longer calls the layout lifecycle unavailable, a layout save can use theETagfrom the previous save's204as well as the GET, node PUT also documents409for a URL that belongs to another node, and the reprobeerrorrow describes v2's fixed summary. It also noted that the node update422carries noerrors[]location, unlike the wire conventions. That's a handler question, so the docs still just say422.Note
Fix admin API reference docs to match the v2 contract
/api/v2/admin, error codes for asset uploads and node admin (422,409,413,503),If-Match-guarded dashboard layout saves with428/412responses, and the v1 retirement policy (business routes return410 Gonewhile/api/v1/healthand/api/v1/readystay served).advisory_titlesstatistics field.PUT /api/v2/admin/settingsin admin-settings-api.md, empty-array semantics in admin-system-api.md, retention sweeps in admin-tasks-api.md, and profile limit errors in admin-users-api.md.Macroscope summarized 67e74b7.