Skip to content

Migrate alert commands off legacy APIs by Aug 17 #1274

Closed

Description

@sentry-junior

Finish moving sentry alert off legacy alerts APIs before they are retired on 2026-08-17.

Production traffic from CLI 0.38.0 (User-Agent: sentry-cli/0.38.0 … node/…) is already hitting those endpoints via first-class sentry alert commands in src/lib/api/alerts.ts, not only via sentry api.

Migration guide: https://www.sentry.help/en/articles/15015315-migrating-to-new-detectors-and-alerts-apis

Still on legacy paths (main)

  • Issue alert create/edit (and edit baseline fetch): /projects/{org}/{project}/rules/
  • All metric alert ops: /organizations/{org}/alert-rules/

Already migrated

Scope

Related: getsentry/toolkit#1482, #1142

Requested by Burak Yigit Kaya via Junior.

--

View Junior Session in Sentry

Activity

  1. self-assigned this
    on Jul 22, 2026
  2. BYK commented on Aug 2, 2026

    @BYK
    Member

    Jared, is this fully done now so we can close the issue?

  3. added
    jaredTrigger the Jared agent to work on stuff
    and removed
    jaredTrigger the Jared agent to work on stuff
    on Aug 3, 2026
  4. jared-outpost commented on Aug 3, 2026

    @jared-outpost
    Contributor

    The API migration this issue asks for is already fully landed on main — no code change left to make here.

    Audited packages/cli/src/lib/api/alerts.ts (repo is now a pnpm monorepo): every read and write for both issue alerts and metric alerts targets the new endpoints. Zero live call sites remain on the retiring /projects/{org}/{project}/rules/ or /organizations/{org}/alert-rules/ paths — those strings now only appear in migration-history comments.

    Operation Endpoint now
    issue alert list/get/create/edit/delete /organizations/{org}/workflows/
    metric alert list/get/edit/delete /organizations/{org}/detectors/
    metric alert create /projects/{org}/{project}/detectors/

    Landed via #1275 (metric reads) and #1338 (metric mutations); issue-alert mutations were already on /workflows/. The only remaining /alerts/rules/ references are in sentry-urls.ts, which builds Sentry web UI links, not API requests — those are correct and unaffected.

    Verified locally: the alert unit suite (test/lib/api/alerts.test.ts + test/commands/alert) is 171/171 green on current main.

    Remaining scope — not a code change: #1338 merged on 2026-08-02, after the 0.40.0 release (2026-07-31), so the metric-mutation migration isn't in a published version yet. A CLI release cut from current main needs to ship before the 2026-08-17 cutoff so users can upgrade. That's a maintainer/craft release action, so I'm leaving it to you rather than opening an empty PR.

    If there's a specific gap you're still seeing on legacy endpoints (e.g. something from #1142), point me at it and I'll take it.

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

Metadata

Metadata

Assignees

Labels

jaredTrigger the Jared agent to work on stuff

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions