get #
Gets a notification rule.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/notification-rules/:index/:_id
Method: GET
Javascript #
kuzzle.query({
controller: 'notifications',
action: 'get',
index: '<index>',
_id: '<notification rule id>',
});
Arguments #
index
: Tenant index_id
: Notification rule ID
Response #
Returns the notification rule.
{
"status": 200,
"action": "get",
"controller": "notification-rules",
"error": null,
"headers": {},
"index": "<index>",
"node": "knode-1",
"requestId": "request-id",
"result": {
"_id": "notification-rule-id",
"_source": {
"type": "notification-rules",
"notification-rules": {
"name": "My notification rule",
"description": "Example notification rule",
"filters": {},
"linkedAlertRules": [],
"plannings": [
{
"channels": [
"email"
],
"recipients": [],
"days": {
"mon": true,
"tue": true,
"wed": false,
"thu": false,
"fri": false,
"sat": false,
"sun": false
},
"range": {
"allDay": true,
"start": "09:00",
"end": "17:00"
},
"timezone": "Europe/Paris"
}
],
"emailAction": {
"message": "A new alert has been triggered.",
"subject": "New alert",
"client": "smtp",
"enabled": true,
"tenant": "<index>"
},
"smsAction": {
"message": "A new alert has been triggered.",
"subject": "",
"client": "twilio",
"enabled": true,
"tenant": "<index>"
}
},
"_kuzzle_info": {
"author": "user",
"createdAt": 1600000000000,
"updatedAt": null,
"updater": null
}
},
"_version": 1
}
}
Edit this page on Github(opens new window)