@@ -235,6 +235,10 @@ class AlertRuleFetchMixin(Endpoint):
235235 Can be used with any endpoint base class (OrganizationEndpoint, ProjectEndpoint, etc).
236236 """
237237
238+ # Subclasses may set a per-method granular flag (e.g. for GET) that is OR'd
239+ # with the broad workflow-engine-rule-serializers flag.
240+ workflow_engine_method_flags : dict [str , str ] = {}
241+
238242 def fetch_metric_alerts (
239243 self ,
240244 request : Request ,
@@ -252,8 +256,11 @@ def fetch_metric_alerts(
252256 extra = {"organization" : organization .id },
253257 )
254258
255- use_workflow_engine = features .has (
256- "organizations:workflow-engine-rule-serializers" , organization
259+ method_flag = self .workflow_engine_method_flags .get (request .method or "" )
260+ use_workflow_engine = (
261+ features .has ("organizations:workflow-engine-rule-serializers" , organization )
262+ or method_flag is not None
263+ and features .has (method_flag , organization )
257264 )
258265
259266 if use_workflow_engine :
@@ -908,6 +915,9 @@ class OrganizationAlertRuleIndexEndpoint(OrganizationAlertRuleBaseEndpoint, Aler
908915 "POST" : ApiPublishStatus .PUBLIC ,
909916 }
910917 permission_classes = (OrganizationAlertRulePermission ,)
918+ workflow_engine_method_flags = {
919+ "GET" : "organizations:workflow-engine-orgalertruleindex-get" ,
920+ }
911921
912922 @extend_schema (
913923 operation_id = "(DEPRECATED) List an Organization's Metric Alert Rules" ,
0 commit comments