Skip to content

Add org-scoped equivalents for project-scoped API endpoints (region routing / DE latency) #118963

Closed

Description

@dcramer

Context

Sentry has a @deprecated decorator (in src/sentry/api/helpers/deprecation.py) that emits X-Sentry-Deprecation-Date / X-Sentry-Replacement-Endpoint headers and runs brownouts (HTTP 410 on a cron schedule) after the deprecation date.

Currently deprecated with active brownouts:

  • ALERTS_API_DEPRECATION_DATE = 2026-05-14 — cron 0 */2 * * *, duration 120s → 2 min every 2 hours returning 410
    • /projects/{org}/{project}/rules/ → /organizations/{org}/workflows/
    • /projects/{org}/{project}/alert-rules/ → /organizations/{org}/alert-rules/
  • CELL_API_DEPRECATION_DATE = 2026-05-15 — default cron 0 12 * * *, duration 60s
    • GET /projects/ (project index) → /organizations/{org}/projects/
    • Several group/issue endpoints

All other /projects/{org}/{project}/... endpoints have no @deprecated marker.

Missing org-scoped endpoints blocking client migration

The following project-scoped endpoints have no org-scoped equivalent, meaning clients cannot migrate off them even if desired. This tracks adding those equivalents.

Client keys

/projects/{org}/{project}/keys/ and /projects/{org}/{project}/keys/{id}/ (PUBLIC). /organizations/{org}/project-keys/ is GET-only list-all — not a CRUD replacement.

Event attachments

/projects/{org}/{project}/events/{event_id}/attachments/ (PUBLIC).

Replay recording segments

/projects/{org}/{project}/replays/{replay_id}/recording-segments/ (PUBLIC).

Transaction profiles

/projects/{org}/{project}/profiling/profiles/{profile_id}/ (PUBLIC). Org-scoped profiling explore endpoints already exist.

Project repo link

/projects/{org}/{project}/repo/ (PUBLIC).

Add/remove team from project

/projects/{org}/{project}/teams/{team}/ (PUBLIC).

Single project GET/PUT

/projects/{org}/{project}/ (PUBLIC). /organizations/{org}/projects/ list exists; no single-project GET/PUT.

DIF / build assembly

/projects/{org}/{project}/files/difs/assemble/ and /projects/{org}/{project}/files/preprodartifacts/assemble/ — used by sentry-cli.

Preprod artifact snapshots

/projects/{org}/{project}/preprodartifacts/snapshots/ and .../upload-options/ — used by sentry-cli.

Trace item details

/projects/{org}/{project}/trace-items/{item_id}/ (EXPERIMENTAL).

Related

Activity

  1. linear-code commented on Jul 2, 2026

    @linear-code
  2. markstory commented on Jul 10, 2026

    @markstory
    Member

    The following project-scoped endpoints have no org-scoped equivalent, meaning clients cannot migrate off them even if desired. This tracks adding those equivalents.

    These project scoped URLs don't need to change as they also have organization_id_or_slug as a route parameter so we can route requests that land on sentry.io

  3. sentry-junior commented on Oct 16, 2026

    @sentry-junior
    Contributor

    Closing based on the comment above: the project-scoped endpoints listed here include organization_id_or_slug in the route, so requests landing on sentry.io can already be routed. No org-scoped equivalents are needed for the routing goal.

    Related client status: getsentry/toolkit#1482 is complete. The CLI's deprecated issue alert calls now all use /organizations/{org}/workflows/ (reads in getsentry/cli#1215, delete in getsentry/cli#1216, create/edit in getsentry/cli#1223). Its remaining project-scoped calls, such as replay recording segments and trace item details, can stay as they are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions