import co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
val notifications = novu.notifications(notificationRequest)
println(notifications)
}
{
"hasMore": true,
"data": [
{
"_environmentId": "<string>",
"_organizationId": "<string>",
"transactionId": "<string>",
"_id": "<string>",
"createdAt": "<string>",
"channels": "in_app",
"subscriber": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"template": {
"name": "<string>",
"triggers": [
{
"type": "event",
"identifier": "<string>",
"variables": [
{
"name": "<string>"
}
],
"subscriberVariables": [
{
"name": "<string>"
}
]
}
],
"_id": "<string>"
},
"jobs": [
{
"_id": "<string>",
"type": "<string>",
"executionDetails": [
{
"_id": "<string>",
"_jobId": "<string>",
"status": "Success",
"detail": "<string>",
"isRetry": true,
"isTest": true,
"providerId": {},
"source": "Credentials",
"raw": "<string>"
}
],
"step": {
"_id": "<string>",
"active": true,
"filters": {
"isNegated": true,
"type": "BOOLEAN",
"value": "AND",
"children": [
{
"field": "<string>",
"value": "<string>",
"operator": "LARGER",
"on": "subscriber"
}
]
},
"template": {}
},
"providerId": {},
"status": "<string>",
"digest": {},
"payload": {}
}
]
}
],
"pageSize": 123,
"page": 123
}List all notification events (triggered events) for the current environment. This API supports filtering by channels, templates, emails, subscriberIds, transactionId, topicKey. Checkout all available filters in the query section. This API returns event triggers, to list each channel notifications, check messages APIs.
import co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
val notifications = novu.notifications(notificationRequest)
println(notifications)
}
{
"hasMore": true,
"data": [
{
"_environmentId": "<string>",
"_organizationId": "<string>",
"transactionId": "<string>",
"_id": "<string>",
"createdAt": "<string>",
"channels": "in_app",
"subscriber": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"template": {
"name": "<string>",
"triggers": [
{
"type": "event",
"identifier": "<string>",
"variables": [
{
"name": "<string>"
}
],
"subscriberVariables": [
{
"name": "<string>"
}
]
}
],
"_id": "<string>"
},
"jobs": [
{
"_id": "<string>",
"type": "<string>",
"executionDetails": [
{
"_id": "<string>",
"_jobId": "<string>",
"status": "Success",
"detail": "<string>",
"isRetry": true,
"isTest": true,
"providerId": {},
"source": "Credentials",
"raw": "<string>"
}
],
"step": {
"_id": "<string>",
"active": true,
"filters": {
"isNegated": true,
"type": "BOOLEAN",
"value": "AND",
"children": [
{
"field": "<string>",
"value": "<string>",
"operator": "LARGER",
"on": "subscriber"
}
]
},
"template": {}
},
"providerId": {},
"status": "<string>",
"digest": {},
"payload": {}
}
]
}
],
"pageSize": 123,
"page": 123
}Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eimport co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
val notifications = novu.notifications(notificationRequest)
println(notifications)
}
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
in_app, email, sms, chat, push Show child attributes
in_app, email, sms, chat, push, digest, trigger, delay, custom Show child attributes
Show child attributes
event Show child attributes
Show child attributes
Success, Warning, Failed, Pending, Queued, ReadConfirmation Credentials, Internal, Payload, Webhook Show child attributes
Show child attributes
BOOLEAN, TEXT, DATE, NUMBER, STATEMENT, LIST, MULTI_LIST, GROUP AND, OR Show child attributes
LARGER, SMALLER, LARGER_EQUAL, SMALLER_EQUAL, EQUAL, NOT_EQUAL, ALL_IN, ANY_IN, NOT_IN, BETWEEN, NOT_BETWEEN, LIKE, NOT_LIKE, IN subscriber, payload Was this page helpful?