# Global Event Rules/Rulesets/Rules

## List Ruleset Rules

> Get all rules of a GER Ruleset.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V3.GlobalEventRules.RulesetRuleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRule"}]},"V3.GlobalEventRules.RulesetRule":{"type":"object","properties":{"id":{"type":"integer"},"global_event_rule_id":{"type":"integer"},"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleAction"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"V3.GlobalEventRules.RuleAction":{"type":"object","required":["route_to"],"properties":{"route_to":{"type":"string","description":"The service ID to which the alert should be routed."}}},"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules":{"get":{"operationId":"GlobalEventRules_listRulesetRules","summary":"List Ruleset Rules","description":"Get all rules of a GER Ruleset.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page_number","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filters.search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRuleResponse"}},"meta":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"]}},"required":["data","meta"]}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"]}}}}
```

## Create Rule

> Create a GER Ruleset Rule.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V3.GlobalEventRules.RulesetRuleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRule"}]},"V3.GlobalEventRules.RulesetRule":{"type":"object","properties":{"id":{"type":"integer"},"global_event_rule_id":{"type":"integer"},"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleAction"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"V3.GlobalEventRules.RuleAction":{"type":"object","required":["route_to"],"properties":{"route_to":{"type":"string","description":"The service ID to which the alert should be routed."}}},"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."},"V3.GlobalEventRules.CreateOrUpdateRuleRequest":{"type":"object","required":["description","expression","action"],"properties":{"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleAction"}}}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules":{"post":{"operationId":"GlobalEventRules_createRule","summary":"Create Rule","description":"Create a GER Ruleset Rule.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The request has succeeded and a new resource has been created as a result.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRuleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V3.GlobalEventRules.CreateOrUpdateRuleRequest"}}}}}}}}
```

## Get Rule by ID

> Get a GER Ruleset Rule by its ID.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V3.GlobalEventRules.RulesetRuleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRule"}]},"V3.GlobalEventRules.RulesetRule":{"type":"object","properties":{"id":{"type":"integer"},"global_event_rule_id":{"type":"integer"},"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleAction"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"V3.GlobalEventRules.RuleAction":{"type":"object","required":["route_to"],"properties":{"route_to":{"type":"string","description":"The service ID to which the alert should be routed."}}},"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules/{rule_id}":{"get":{"operationId":"GlobalEventRules_getRuleById","summary":"Get Rule by ID","description":"Get a GER Ruleset Rule by its ID.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRuleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"]}}}}
```

## Delete Rule by ID

> Delete a GER Ruleset Rule by its ID.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules/{rule_id}":{"delete":{"operationId":"GlobalEventRules_deleteRuleById","summary":"Delete Rule by ID","description":"Delete a GER Ruleset Rule by its ID.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. ","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"]}}}}
```

## Update Rule by ID

> Update a GER Ruleset Rule by its ID.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V3.GlobalEventRules.RulesetRuleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRule"}]},"V3.GlobalEventRules.RulesetRule":{"type":"object","properties":{"id":{"type":"integer"},"global_event_rule_id":{"type":"integer"},"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleAction"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"V3.GlobalEventRules.RuleAction":{"type":"object","required":["route_to"],"properties":{"route_to":{"type":"string","description":"The service ID to which the alert should be routed."}}},"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."},"V3.GlobalEventRules.UpdateRuleRequest":{"type":"object","properties":{"description":{"type":"string"},"expression":{"type":"string"},"action":{"$ref":"#/components/schemas/V3.GlobalEventRules.RuleActionUpdate"}}},"V3.GlobalEventRules.RuleActionUpdate":{"type":"object","properties":{"route_to":{"type":"string","description":"The service ID to which the alert should be routed."}}}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules/{rule_id}":{"patch":{"operationId":"GlobalEventRules_updateRuleById","summary":"Update Rule by ID","description":"Update a GER Ruleset Rule by its ID.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V3.GlobalEventRules.RulesetRuleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V3.GlobalEventRules.UpdateRuleRequest"}}}}}}}}
```

## Reorder Ruleset By Index

> Reorder a GER Ruleset Rule by its index in the ruleset.

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Global Event Rules/Rulesets/Rules"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V3.GlobalEventRules.OrderingResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V3.GlobalEventRules.Ordering"}]},"V3.GlobalEventRules.Ordering":{"type":"object","required":["ordering"],"properties":{"ordering":{"type":"array","items":{"type":"integer"}}}},"Common.V3.ErrorMeta":{"type":"object","required":["status","error_message"],"properties":{"status":{"anyOf":[{"type":"string"},{"type":"integer"}]},"error_message":{"type":"string"}},"description":"Represents a single response containing data of type T."},"V3.GlobalEventRules.ReorderRuleRequest":{"type":"object","properties":{"shift_to":{"type":"string"},"shift_index_by":{"type":"integer"}}}}},"paths":{"/v3/global-event-rules/{ger_id}/rulesets/{alert_source_version}/{alert_source_shortname}/rules/{rule_id}/priority":{"patch":{"operationId":"GlobalEventRules_reorderRulesetByIndex","summary":"Reorder Ruleset By Index","description":"Reorder a GER Ruleset Rule by its index in the ruleset.","parameters":[{"name":"ger_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"alert_source_version","in":"path","required":true,"schema":{"type":"string"}},{"name":"alert_source_shortname","in":"path","required":true,"schema":{"type":"string"}},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V3.GlobalEventRules.OrderingResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Common.V3.ErrorMeta"}},"required":["meta"]}}}}},"tags":["Global Event Rules/Rulesets/Rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V3.GlobalEventRules.ReorderRuleRequest"}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/api-reference/global-event-rules-rulesets-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
