alerting tasks
Create data alert task
Creates a new data alerting task.
post/api/v1/data-alerts
Request body
Example request
{
"recipients": {
"userIds": [
{
"value": "1b263bs8m0mm_s21s3f",
"groups": [
"addedIndividually",
"group1",
"group2"
],
"enabled": true,
"subscribed": true,
"taskRecipientErrors": [
{
"timestamp": "2019-10-15T16:07:01.492Z"
}
],
"alertingTaskRecipientErrors": [
{
"added": "2019-10-15T16:07:01.492Z"
}
]
}
],
"groupIds": [
{
"value": "group1",
"enabled": true,
"taskGroupRecipientErrors": [
{
"timestamp": "2019-10-15T16:07:01.492Z"
}
],
"alertingTaskGroupRecipientErrors": [
{
"added": "2019-10-15T16:07:01.492Z"
}
]
}
]
},
"scheduleOptions": {
"timezone": "Canada/Pacific",
"recurrence": [
"RRULE:FREQ=HOURLY;INTERVAL=2"
],
"endDateTime": "2026-01-02T16:04:05",
"startDateTime": "2006-01-02T16:04:05",
"lastExecutionTime": "2020-11-20T12:00:55.000Z",
"nextExecutionTime": "2020-11-20T12:00:55.000Z"
}
}Response
Alert creation has been accepted. The alerting task will have status creating, until status is set to either valid or invalid.
Example response
{
"id": "5da5825325dc9a0dd0260af9",
"links": {
"self": {
"href": "http://localhost:8787/v1/items/5da5825325dc9a0dd0260af9"
}
},
"recipients": {
"userIds": [
{
"value": "1b263bs8m0mm_s21s3f",
"groups": [
"addedIndividually",
"group1",
"group2"
],
"enabled": true,
"subscribed": true,
"taskRecipientErrors": [
{
"timestamp": "2019-10-15T16:07:01.492Z"
}
],
"alertingTaskRecipientErrors": [
{
"added": "2019-10-15T16:07:01.492Z"
}
]
}
],
"groupIds": [
{
"value": "group1",
"enabled": true,
"taskGroupRecipientErrors": [
{
"timestamp": "2019-10-15T16:07:01.492Z"
}
],
"alertingTaskGroupRecipientErrors": [
{
"added": "2019-10-15T16:07:01.492Z"
}
]
}
]
},
"dateCreated": "2019-10-15T16:07:01.492Z",
"lastUpdated": "2019-10-15T16:07:01.492Z",
"scheduleOptions": {
"timezone": "Canada/Pacific",
"recurrence": [
"RRULE:FREQ=HOURLY;INTERVAL=2"
],
"endDateTime": "2026-01-02T16:04:05",
"startDateTime": "2006-01-02T16:04:05",
"lastExecutionTime": "2020-11-20T12:00:55.000Z",
"nextExecutionTime": "2020-11-20T12:00:55.000Z"
},
"alertingTaskErrors": [
{
"added": "2019-10-15T16:07:01.492Z"
}
],
"recipientsChangeHistory": [
{
"patchAction": [
{
"op": "add",
"value": {
"value": "recipient-1",
"enabled": true
},
"recipientType": "userid"
},
{
"op": "remove",
"value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
"recipientType": "userid"
},
{
"op": "enable",
"value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
"recipientType": "userid"
},
{
"op": "disable",
"value": "I6mWVd60wRWIbOXZr1ZKV8QTnxhnitb",
"recipientType": "userid"
},
{
"op": "replace",
"value": [
{
"value": "recipient-1",
"enabled": true
},
{
"value": "recipient-2",
"enabled": false
}
],
"recipientType": "userid"
}
]
}
]
}