doc: require an audience qualifier segment in REST v2 URLs#12990
Draft
jopemachine wants to merge 1 commit into
Draft
doc: require an audience qualifier segment in REST v2 URLs#12990jopemachine wants to merge 1 commit into
jopemachine wants to merge 1 commit into
Conversation
jopemachine
force-pushed
the
docs/rest-v2-domain-entity-url-convention
branch
from
July 21, 2026 06:39
5cc69fc to
97e4681
Compare
jopemachine
force-pushed
the
docs/rest-v2-domain-entity-url-convention
branch
from
July 21, 2026 06:42
97e4681 to
af6984b
Compare
jopemachine
force-pushed
the
docs/rest-v2-domain-entity-url-convention
branch
2 times, most recently
from
July 21, 2026 06:46
753da30 to
9215039
Compare
The scoped-search shape sat as "under consideration" across four AGENTS.md files, so
neither direction was safe to follow. Settle it: the scope is a request body field and
the path is the fixed `/v2/{entity}/scoped/search`; the nested `{scope_type}/{scope_id}`
path is legacy. Methods take the `scoped_` prefix; `{scope}_` is legacy.
Also make the audience a required path segment. `admin` / `scoped` / `my` are already
method prefixes and `scoped` / `my` already appeared in URLs, but the admin variant was
written as a bare `/v2/{entity}/search`, leaving the audience unreadable from the path.
Define the URL shape for sub-apps that group several entities, which the previous
`/v2/{entity}/...` wording had no reading for.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jopemachine
force-pushed
the
docs/rest-v2-domain-entity-url-convention
branch
from
July 21, 2026 06:49
9215039 to
c37cf1f
Compare
4 tasks
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
The scoped-search shape sat as "under consideration" across four
AGENTS.mdfiles, so neither direction was safe to follow when adding a new endpoint. Settle it, and fill two gaps the wording left open./v2/{entity}/scoped/search; methods take thescoped_prefix. The nested{scope_type}/{scope_id}path and{scope}_-named methods are marked legacy — kept in the docs, since most existing code still looks like that, but flagged as "do not add new ones".admin/scoped/myare already method prefixes, andscoped/myalready appeared in URLs, but the admin variant was written as a barePOST /v2/{entity}/search, leaving the audience unreadable from the path. It is now/v2/{entity}/admin/search.POST /v2/{entity}/searchassumed one entity per sub-app and had no reading forscheduling-history, which holds session, kernel, deployment, and route histories. Pinned as/v2/{domain}/{entity}/{qualifier}/{operation}, with the qualifier attached to the entity.Applied across
manager/api/AGENTS.md,manager/api/rest/v2/AGENTS.md,client/v2/AGENTS.md, andclient/cli/v2/AGENTS.md— the same decision was recorded as pending in each, andclient/v2/AGENTS.mdexplicitly asked for the URL pattern and CLI surface to be decided together. The full URL grammar lives only inrest/v2/AGENTS.md; the parent references it.Docs only. #12989 and #12866 follow the settled shape.
Test plan
api/rest/v2/AGENTS.md; the parentapi/AGENTS.mdlinks rather than repeats/searchroutes are left alone — migrating them is a breaking change and needs its own decision🤖 Generated with Claude Code