Alert Dismissal Error response via API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Alert Dismissal Error response via API

L0 Member

Anyone have experience using the Prisma Cloud API with dismissing alert, i've been testing the but always getting 404 or 400 response, check parameters below

 

url = "https://api.prismacloud.io/alert/dismiss"

payload = {
                        "alerts": [param.get("alert_id")],
                        "dismissalTimeRange": {
                            'type''absolute',
                            'value': {
                                'startTime'0,
                                'endTime': end_time
                            }
                        },
                        "filter": {
                            "timeRange": {
                                'type''absolute',
                                'value': {
                                    'startTime'0,
                                    'endTime': end_time
                                }
                            },
                            "limit""1",
                            "detailed""true"
                        }
                    }
 
been looking on the community but not found any good solutions.
1 accepted solution

Accepted Solutions

Dismissal Range is for the new snooze feature to specify the time range for keeping the alert in dismissed status. 

If you are dismissing without snoozing, then Dismissal Range is not needed.

View solution in original post

3 REPLIES 3

L3 Networker

Policies array might be required - here's mine that works and it seems to be the only major thing missing from your payload.  Also make sure it's a POST.

 

Payload: 
  
   "alerts":
      "P-1424086"
   ],
   "policies":

   ],
   "filter":
      "filters":
         
            "operator":"=",
            "name":"alert.status",
            "value":"open"
         },
         
            "operator":"=",
            "name":"policy.type",
            "value":"config"
         }
      ],
      "timeRange":
         "type":"relative",
         "value":
            "amount":1,
            "unit":"week"
         }
      }
   },
   "dismissalNote":"Test2"
}

Thanks on your response,

 

I've solve it via removing "dismissalTimeRange" on parameter. i don't have any idea why it does not work having that on parameters.

 

Thanks!

Dismissal Range is for the new snooze feature to specify the time range for keeping the alert in dismissed status. 

If you are dismissing without snoozing, then Dismissal Range is not needed.

  • 1 accepted solution
  • 7378 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!