Merging same incident in one incident automatically

(Harsh Maru) #1

Hallo, As i am new in pager-duty, I am creating a incident using Event API V2 using JavaScript.

my code :

const fetch = require(‘node-fetch’)
const main = async () => {
const Incident = (await (await fetch(’/incidents’, {
method: ‘POST’,
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’: 'application/vnd.pagerduty+json;version=2 ',
‘From’: ‘’,
‘Authorization’: ‘Token token=H6eo’
body: JSON.stringify({
“incident”: {
“type”: “incident”,
“title”: “The server is on fire 500.”,
“service”: {
“id”: “PZF3”,
“type”: “service_reference”
“escalation_policy”: {
“id”: “PQ4”,
“type”: “escalation_policy_reference”
“incident_key”: “1”,
“body”: {
“type”: “incident_body”,
“details”: "A disk is getting full on this machine. "


main().catch(err => console.log(err))

The incident is create first time successfully. if the incident is coming same as like above second time, it show an error.

error second time:

Same error if I provide “dedup_key”: “1” in body.

{ error:
{ message: ‘Arguments Caused Error’,
code: 2002,
[ ‘Open incident with matching dedup key already exists on this service’ ] } }

As i ask support, they provide me an documentation of event Management //, where its mention using same incident key, we can merge same incident in one automatically. but it haven’t worked out for me !

Please let me know, where I am wrong!

Best Regards

(John O'Donnell) #2

Hi Harsh,

Thanks for reaching out on Community. Since we already have an open Support ticket on this one and as it contains some sensitive info, I will keep the thread going there!

Kind regards,

(system) closed #3

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