jQuery.post('/bi/alert/api:create', {
"data": JSON.stringify({
"dataSetId": 1933,
"disabled": null,
"sendOnceInterval": null,
"executeOnDataChange": true,
"scheduleTime": null,
"schedulePeriod": null,
"owner": {
"id": 1,
"username": "myusername",
"email": "myusername@belladati.com"
},
"filter": "{}",
"elements": [{
"name": "att1",
"description": null,
"type": "drilldown",
"attribute": "L_COLUMN_1"
}, {
"name": "att2 long text",
"description": null,
"type": "drilldown",
"attribute": "L_ATT2"
}, {
"name": "ind",
"description": null,
"type": "dataIndicator",
"indicator": "M_IND"
}
],
"actions": [{
"type": "email",
"recipients": [{
"id": 1,
"username": "myusername",
"email": "myusername@belladati.com"
}
],
"subject": "subject",
"body": "@@@ text in email @@@",
"recipientsFormula": null,
"merge": null,
"recipientsElementIndex": null,
"disabled": null
}, {
"type": "dataset",
"dataSetCode": "BI;NOTIFICATION_NO_AGGREGATI_1",
"disabled": null
}
],
"conditions": [{
"compareOperation": "GT",
"formula": "2",
"elementName": "ind",
"disabled": null
}
],
"schedule": [{
"fromDay": "MONDAY",
"toDay": "SUNDAY",
"fromTime": "16:03:00.000",
"toTime": "16:03:00.000"
}
]
})
}, function (reply) {
console.log(reply);
}) |