Create On Demand Notification
POST/alerts/api/v1/notification/ondemand
Create on demand notification for an alert. Supported channels are:
- Jira
- SlackFor details about the request body parameters required for each notification channel, see the following table:info
This endpoint is available on the Prisma Cloud Darwin release only.
Request Parameters | Jira | Slack | |
---|---|---|---|
alertId | Required | Required | Required |
onDemandNotificationConfig.integrationType | Required | Required | Required |
onDemandNotificationConfig.templateId | Required | Not required | Not required |
onDemandNotificationConfig.recipients | Required | Required | Required |
translation.body | Not required | Optional | Optional |
translation.details.sender | Not required | Required | Required |
translation.details.recipients | Not required | Required | Required |
translation.details.callbackUrl | Not required | Optional | Optional |
translation.details.assetCallbackUrl | Not required | Optional | Optional |
Request
- application/json
Body
Id of the alert for which Notification needs to be sent
onDemandNotificationConfig objectrequired
Id of the alert for which Notification needs to be sent
Id to identify the category of request. For Jira, Email, Slack, it can be CS
For ad-hoc notification, its value should be REALTIME
Can be either Jira, Email or Slack
Jira template Id
List of Integration id for jira or email for email or channel for slack etc.
translation object
Message Body. Applicable for email and slack.
details object
Its a map of key-value pair. It contains details like Subject, Alert Url, Asset Url etc.
This field contains the list of paths to the S3 file from where the attachment needs to be fetched.
Responses
- 201
- 400
- 401
- 403
- 404
- 429
Created
- application/json;charset=UTF-8
- Schema
- Example (from schema)
- Jira
- Slack
Schema
successfulEvents object
{
"success": 0,
"failed": 0,
"successfulEvents": {
"recipient": {},
"customerId": 0,
"clientId": "string",
"metaData": {},
"notificationId": "string"
},
"failedEvents": {}
}
{
"success": 1,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "REALTIME",
"integrationType": "jira",
"id": "151fbea7-8a64-4367-b500-735b685752bf"
},
"customerId": 3,
"clientId": "CS",
"metaData": {
"jiraKey": "P-1234(JIRA ID)"
},
"notificationId": "dd67ac26-b2e2-4775-abbf-a40a6dec6a24"
}
],
"failedEvents": {}
}
{
"success": 1,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "REALTIME",
"integrationType": "email",
"id": "xxxx@paloaltonetworks.com, yyyy@paloaltonetworks.com"
},
"customerId": 6,
"clientId": "CS",
"id": "null#1809667743",
"notificationId": "b9f0ac86-cb46-4859-9779-1385f97d4e56"
}
],
"failedEvents": {}
}
{
"success": 1,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "REALTIME",
"integrationType": "slack",
"id": "92bf2080-dee0-4145-b4d8-19de27cf1f00"
},
"customerId": 6,
"clientId": "CS",
"id": "null#1739477015",
"notificationId": "30b98415-10b5-4ed8-a994-e8ff82cca531"
}
],
"failedEvents": {}
}
Bad Request
- application/json;charset=UTF-8
- Schema
- Example (from schema)
- 1
Schema
- Array [
- ]
error objectrequired
details object[]
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{}
]
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "alertId is not defined"
}
}
Unauthorized
Forbidden
Not Found
Too Many Requests