Skip to content

ref(mcp): Call shared client key, repository, and onboarding endpoints - #1834

Merged
BYK merged 1 commit into
mainfrom
ref/shared-project-settings-endpoints
Nov 3, 2026
Merged

BYK merged 1 commit into
mainfrom
ref/shared-project-settings-endpoints

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Task 8.4 of the shared API client plan (#1669). This is stacked on #1828.

This moves the project setup endpoints from SentryApiService into toolkit-core's api-client/endpoints/. SentryApiService calls them with its Zod schemas. The code moves as is.

  • endpoints/client-keys: listClientKeys, createClientKey, and updateClientKey. updateClientKey still sends only the fields that are set, and keeps an explicit rateLimit: null. SentryApiService.updateClientKey now takes the shared UpdateClientKeyParams type, and its local request types are deleted.
  • endpoints/repositories: listRepositories, which walks every page, and linkProjectRepository, which sends the bulk code-mapping POST with one root mapping.
  • endpoints/organizations gains updateAgenticOnboardingStatus.

@sentry/api has no operation for POST /organizations/{org}/onboarding/agent/status/, so that wrapper will stay hand-written.

One change in behaviour: as with #1741, a response that fails its schema now throws the shared ApiResponseValidationError instead of a ZodError.

via @BYK.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 3, 2026 10:34am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 3, 2026
Base automatically changed from ref/shared-teams-projects-endpoints to main November 3, 2026 10:26
Moves the client key, repository, code mapping, and agentic onboarding
status endpoints from SentryApiService into toolkit-core's shared API
client, as is. SentryApiService calls them with its Zod schemas.
@sentry-junior
sentry-junior Bot force-pushed the ref/shared-project-settings-endpoints branch from 9dab7ae to c5db98c Compare November 3, 2026 10:34
@BYK
BYK enabled auto-merge (squash) November 3, 2026 10:34
@BYK
BYK merged commit aa4ddb1 into main Nov 3, 2026
35 checks passed
@BYK
BYK deleted the ref/shared-project-settings-endpoints branch November 3, 2026 10:47
BYK pushed a commit that referenced this pull request Nov 3, 2026
Task 8.4 of the shared API client plan
([#1669](#1669)). This is
stacked on #1834.

This moves the dashboard and release endpoints from `SentryApiService`
into `toolkit-core`'s `api-client/endpoints/`. `SentryApiService` calls
them with its Zod schemas. The code moves as is.

- `endpoints/dashboards`: `listDashboards` (one page, with the next
cursor) and `getDashboard`.
- `endpoints/releases`: `listReleases`, `getRelease`,
`listReleaseDeploys`, `listReleaseCommits`, and `getEventCommitters`.
With a project, release reads still go to the project's endpoints,
otherwise to the organization's.
- `api-path` gains `withQuery`, for the path-plus-optional-query pattern
the wrappers repeat. `getOrganization` and `getProject` use it too; the
URLs they send don't change.

`@sentry/api` has no operation for the project-scoped release details
route or for event committers, so those wrappers stay hand-written.

**One change in behaviour:** as with #1741, a response that fails its
schema now throws the shared `ApiResponseValidationError` instead of a
`ZodError`.

Checked with `pnpm run tsc`, `pnpm run lint`, `pnpm run docs:check`, and
the toolkit-core, mcp-core, mcp-server bundle, and mcp-cloudflare tests.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
Preview — c5db98c3 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant