Repository navigation
feat(api): Carry x-sentry-project-scope as ApiOperation.projectScope - #132723
Merged
Merged
Conversation
Copy Sentry's x-sentry-project-scope OpenAPI extension into the operation catalog as ApiOperation.projectScope, and export ApiProjectScope from @sentry/api/operations. The build throws on any value Sentry's schema build would reject, the same way it does for x-sentry-routing. Refs getsentry/toolkit#2237 Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 27, 2026
This branch was successfully deployed
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.
@sentry/api/operationsnow carries Sentry'sx-sentry-project-scopeOpenAPI extension, added in #132722, asApiOperation.projectScope. Clients that limit a caller to some projects can read it instead of keeping their own endpoint table. getsentry/toolkit#2552 consumes it for the Sentry CLI and MCP project scope.The values:
path: the path names the project.filter: an organization endpoint that takes theprojectquery parameter (numeric project IDs) and returns or changes only those projects' data.org-metadata: a read-only organization endpoint whose response holds no project's telemetry.GETonly.response:<pointer>: aGETthat looks something up by ID alone. The numeric ID of its project is at<pointer>in the response body.<pointer>is an RFC 6901 JSON pointer (~0/~1escapes) in which a*segment matches every array element, such asresponse:/projects/*/id.The field is left out when an operation has no extension, which means the operation is not known to respect a project limit.
ApiProjectScopeis exported from@sentry/api/operationsnext toApiOperation. Like thex-sentry-routingcheck, the build throws on a non-string value, on an unknown value, on a malformed pointer, and onorg-metadataorresponse:on a method other thanGET. These are the same rules that #132722's schema build enforces.The released catalog has no
projectScopevalues until #132722 merges and the schema is rebuilt.Refs getsentry/toolkit#2237
via @BYK.
--
View Session [Sentry]