Skip to content

Remove non-org-scoped API endpoints #1482

Open

Description

@dcramer

Summary

/projects/{org}/{project}/rules/ (issue alert rules) was formally deprecated on 2026-05-14 with active brownouts — Sentry returns HTTP 410 GONE every 2 hours for 2 minutes. These are actively failing for users. This is urgent.

The replacement is /organizations/{org}/workflows/. sentry-mcp already uses this — see listIssueAlertRulesPage() there for the implementation pattern.

Affected endpoints in src/lib/api/alerts.ts

  • listIssueAlertsPaginated() — /projects/${org}/${project}/rules/ → /organizations/${org}/workflows/
  • fetchIssueAlertRuleJson() / getIssueAlertRule() — /projects/${org}/${project}/rules/${id}/ → /organizations/${org}/workflows/?id=${id}
  • deleteIssueAlertRule() — DELETE /projects/${org}/${project}/rules/${id}/ → DELETE /organizations/${org}/workflows/${id}/
  • putIssueAlertRule() — PUT /projects/${org}/${project}/rules/${id}/ → PUT /organizations/${org}/workflows/${id}/
  • createIssueAlertRule() — POST /projects/${org}/${project}/rules/ → POST /organizations/${org}/workflows/

Not formally deprecated — no org-scoped equivalent yet

getReplayRecordingSegments and getTraceItemDetail use project-scoped paths with no @deprecated marker. Blocked on getsentry/sentry#118963.

Activity

  1. betegon commented on Jul 9, 2026

    @betegon
    Member

    Migration progress

    Why create/edit are not a simple swap

    Unlike reads/delete, the workflows write endpoint does not accept a legacy rule body. It expects a workflow-document model:

    { name, detector_ids:[number], config:{ frequency }, environment,
      triggers:{ logic_type, conditions[] },
      action_filters:[{ logic_type, conditions[], actions[] }] }
    

    Blockers for the CLI:

    1. Different condition/action item schemas. Users pass legacy identifiers today — --condition '{"id":"sentry.rules.conditions..."}', --action '{"id":"sentry.mail.actions...","targetType":...}'. Workflows want {type, comparison, conditionResult} and {type, config, data}. The legacy→workflow translation lives in the backend (src/sentry/workflow_engine/migration_helpers/issue_alert_dual_write.py: translate_to_data_condition, build_notification_actions_from_rule_data_actions, plus special-cased conditions) and is impractical to replicate faithfully client-side.
    2. detector_ids required. Issue alerts attach to a project's error detector ("Error Monitor"); create must resolve project → detector id (SDK listOrganizationDetectors).
    3. Breaking contract. Migrating changes the documented --condition/--action JSON shapes, and edit's read-modify-write flips to reading/writing a workflow document (getOrganizationWorkflow).

    Recommended next step: decide between (a) a CLI rewrite to the workflow schema, or (b) a backend rule-shaped compat write path reusing the existing dual-write translation.

  2. self-assigned this
    on Oct 12, 2026
  3. linear-code commented on Oct 12, 2026

    @linear-code
  4. transferred this issue fromgetsentry/clion Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions