Send Notification
POST/apm/api/v1/action-plan/:action-plan-id/notification/ondemand
The API sends Jira/slack notifications for a given action plan id. You must have ActionPlanRemediation_UPDATE permission to access this endpoint. Rate limit 2/sec.
Request
Path Parameters
action-plan-id stringrequired
action plan id
Example: action plan id
Header Parameters
x-redlock-auth stringrequired
Authorize using Authentication token
Example: jwt token
- application/json; charset=UTF-8
Body
onDemandNotificationConfig objectrequired
clientId string
Id to identify the category of request. For Jira, Slack, it can be AP
generatorType string
For ad-hoc notification, its value should be REALTIME
integrationType stringrequired
Can be either Jira or Slack
templateId string
Jira template Id
recipients string[]required
List containing single Integration id for jira or list of channels for slack etc.
translation object
body string
Message Body. Applicable for email and slack.
details object
Its a map of key-value pair. It contains details like Subject etc.
property name* string
Responses
- 200
- 400
- 401
- 403
- 404
- 429
OK
- application/json; charset=UTF-8
- Schema
- Example (from schema)
- Jira
- Jira-failure
- Slack
Schema
- Array [
- ]
id string
success integer
failed integer
successfulEvents object[]
recipient object
generatorType string
integrationType string
id string
refId string
customerId integer
clientId string
metaData object
notificationId string
failedEvents object
{
"id": "string",
"success": 0,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "string",
"integrationType": "string",
"id": "string",
"refId": "string"
},
"customerId": 0,
"clientId": "string",
"metaData": {},
"notificationId": "string"
}
],
"failedEvents": {}
}
On-demand Jira Notification Successful Response
{
"id": "action-plan-jira-notification",
"success": 1,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "REALTIME",
"integrationType": "jira",
"id": "151fbea7-8a64-4367-b500-735b685752bf",
"refId": "a0c0f048-153e-4b89-b667-955e09006f62"
},
"customerId": 3,
"clientId": "AP",
"metaData": {
"jiraKey": "P-1234(JIRA ID)"
},
"notificationId": "dd67ac26-b2e2-4775-abbf-a40a6dec6a24"
}
],
"failedEvents": {}
}
On-demand Jira Notification Failed Response
{
"id": "action-plan-jira-notification-failure",
"success": 0,
"failed": 1,
"successfulEvents": [],
"failedEvents": {
"recipient": {
"generatorType": "REALTIME",
"integrationType": "jira",
"id": "151fbea7-8a64-4367-b500-735b685752bf",
"refId": "a0c0f048-153e-4b89-b667-955e09006f62"
},
"customerId": 3,
"errorMessage": "No resource found for given template id",
"notificationId": "dd67ac26-b2e2-4775-abbf-a40a6dec6a24"
}
}
On-demand Slack Notification Response
{
"id": "action-plan-slack-notification",
"success": 1,
"failed": 0,
"successfulEvents": [
{
"recipient": {
"generatorType": "REALTIME",
"integrationType": "slack",
"id": "92bf2080-dee0-4145-b4d8-19de27cf1f00"
},
"customerId": 6,
"clientId": "AP",
"notificationId": "30b98415-10b5-4ed8-a994-e8ff82cca531"
}
],
"failedEvents": {}
}
Bad Request
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
error object
code string
message string
target string
{
"error": {
"code": "string",
"message": "string",
"target": "string"
}
}
Unauthorized
Forbidden
Action-Plan ID not found
Too Many Requests
Loading...