import co.novu.Novu
import co.novu.extensions.notification
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notification = novu.notification("<NOTIFICATION_ID>")
println(notification)
}
{
"_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": {}
}
]
}Retrieve an event by its unique key identifier notificationId. Here notificationId is of mongodbId type. This API returns the event details - execution logs, status, actual notification (message) generated by each workflow step.
import co.novu.Novu
import co.novu.extensions.notification
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notification = novu.notification("<NOTIFICATION_ID>")
println(notification)
}
{
"_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": {}
}
]
}Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eimport co.novu.Novu
import co.novu.extensions.notification
fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notification = novu.notification("<NOTIFICATION_ID>")
println(notification)
}
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Ok
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?