Repository navigation
Remove non-org-scoped API endpoints #1182
Copy link
Copy link
Open
Description
Activity
- added a commit that references this issue
on Jul 9, 2026 Migration progress
- ✅ Reads (
listIssueAlertsPaginated,getIssueAlertRule) →/organizations/{org}/workflows/— fix(alerts): read issue alert rules from org-scoped /workflows/ #1215 (merged) - ✅ Delete (
deleteIssueAlertRule) →DELETE /organizations/{org}/workflows/{id}/— fix(alerts): delete issue alert rules via org-scoped /workflows/ #1216 (draft) - ⏳ Create + edit (
createIssueAlertRule,putIssueAlertRule) — deferred; research below
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:
- 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. detector_idsrequired. Issue alerts attach to a project's error detector ("Error Monitor"); create must resolve project → detector id (SDKlistOrganizationDetectors).- Breaking contract. Migrating changes the documented
--condition/--actionJSON 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.
- ✅ Reads (
- added a commit that references this issue
on Jul 24, 2026
Metadata
Metadata
Assignees
Labels
No labels
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-mcpalready uses this — seelistIssueAlertRulesPage()there for the implementation pattern.Affected endpoints in
src/lib/api/alerts.tslistIssueAlertsPaginated()—/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
getReplayRecordingSegmentsandgetTraceItemDetailuse project-scoped paths with no@deprecatedmarker. Blocked on getsentry/sentry#118963.