# Updating the alerting for all rules with the API

**URL:** https://discuss.elastic.co/t/updating-the-alerting-for-all-rules-with-the-api/303065
**Category:** Elastic Security
**Created:** [April 22, 2022, 11:20pm UTC](https://discuss.elastic.co/t/updating-the-alerting-for-all-rules-with-the-api/303065 "2022-04-22T23:20:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ARDiver86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ardiver86/32/85266_2.png) [@ARDiver86](https://discuss.elastic.co/u/ARDiver86)
#### Post date: [April 22, 2022, 11:20pm UTC](https://discuss.elastic.co/t/updating-the-alerting-for-all-rules-with-the-api/303065/1 "2022-04-22T23:20:02Z")

</div>

Since the ability to bulk edit rules and assign an action does not exist, how can I do this with the API? I've tried a few methods via the Kibana console under dev tools but cannot get any of the GET's to return data (like GET /api/detection\_engine/rules)

What I'm trying to accomplish is set the action for all 600+ rules to be Microsoft Teams with a specific format:

> {{#context.alerts}}  
> {{signal.rule.name}}  
> _{{signal.rule.severity}}_ - {{signal.reason}}
> 
> {{signal.rule.description}}  
> {{/context.alerts}}

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 20, 2022, 11:20pm UTC](https://discuss.elastic.co/t/updating-the-alerting-for-all-rules-with-the-api/303065/2 "2022-05-20T23:20:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
