# Issue with Grouping Alerts into a Single Case from Webhook Connector in Observability

**URL:** https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232
**Category:** Elastic Observability
**Tags:** elastic-stack-alerting
**Created:** [September 9, 2024, 9:23am UTC](https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232 "2024-09-09T09:23:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Danyal\_Danish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danyal_danish/32/131444_2.png) [@Danyal\_Danish](https://discuss.elastic.co/u/Danyal_Danish)
#### Post date: [September 9, 2024, 9:23am UTC](https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232/1 "2024-09-09T09:23:45Z")

</div>

I'm using a webhook connector (created in Stack Management) in **Kibana Observability** to create a case whenever an alert is triggered. However, each time a new alert is generated by the rule, a new case is also created. I would like to group all alerts generated by this rule into a single case instead of creating multiple cases for each alert. The goal is to have all related alerts under one case for better tracking and management, but currently, the case is not consolidating them as expected.

---

<div class="post-metadata">

### Author: ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)
#### Post date: [September 9, 2024, 1:57pm UTC](https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232/2 "2024-09-09T13:57:37Z")

</div>

Hi @Danyal_Danish,

Can you share which URL you are sending to in your webhook to create the case?

---

<div class="post-metadata">

### Author: ![Danyal\_Danish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danyal_danish/32/131444_2.png) [@Danyal\_Danish](https://discuss.elastic.co/u/Danyal_Danish)
#### Post date: [September 9, 2024, 2:18pm UTC](https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232/3 "2024-09-09T14:18:17Z")

</div>

This is the URL and method I have given in the Webhook connector settings:

https://{{kibana-host-url}}:{{kibana-host-port}}/api/cases

Method: POST

This is the request body I'm giving in the Actions settings for the connector:

```auto
{
  "description": "demo-case",
  "title": "demo",
  "tags": ["demo-case"],
  "connector": {
    "id": "none",
    "name": "none",
    "type": ".none",
    "fields": null
  },
  "settings": {
    "syncAlerts": true
  },
  "owner": "observability"
}

```

---

<div class="post-metadata">

### Author: ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)
#### Post date: [September 10, 2024, 10:32am UTC](https://discuss.elastic.co/t/issue-with-grouping-alerts-into-a-single-case-from-webhook-connector-in-observability/366232/4 "2024-09-10T10:32:23Z")

</div>

Thanks for sharing. The `POST` request will create a new case, meaning that since you're calling `POST /api/cases` for each alert it will create a new case for each alert. Looking at the [API documentation](https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-createcasedefaultspace#operation-createcasedefaultspace-body-application-json-elastic-api-version-2023-10-31-settings-syncalerts) it doesn't look like it groups alerts as far as I can see.

Which version of Kibana are you using? I wonder if using the [Case connector](https://www.elastic.co/guide/en/kibana/current/cases-action-type.html) as an alternative will give you the option to group by alerts? It's not something I've played with, and it is in tech preview, but it might be worth a try.

Hope that helps!
