Fetching Events
Overview
The Highnote platform tracks all events across your platform, allowing you to fetch, monitor, and replay events. Events are also used to create notifications. Note the following about events:
- All events are stored for 30 days.
- Events can be replayed to trigger failed notifications. For more information, see Replay Events.
You can view events using the Highnote API or dashboard. This guide provides an overview of fetching and viewing events using the Highnote API. For an overview of monitoring events using the dashboard, see Monitor events.
Fetch all events
You can fetch all events using the following notificationEvents query. This returns a paginated list of results, defaulting to 20 entries:
NotificationEvents
Query
query NotificationEvents($after: String, $first: Int) {
notificationEvents(after: $after, first: $first) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
... on NotificationEvent {
__typename
id
createdAt
expiresAt
name
node {
__typename
... on AuthorizationEvent {
id
approvedAmount {
value
}
}
}
}
}
}
}
}
Variables
{
"first": 20
}
⚠️ Please login to execute queries. Visit the dashboard to authenticate.
Result
{
"data": {
"notificationEvents": {
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "start-cursor",
"endCursor": "end-cursor"
},
"edges": [
{
"node": {
"id": "NOTIFICATION_EVENT_ID",
"createdAt": "2021-11-19T19:13:02.778Z",
"expiresAt": "2021-12-19T19:13:02.778Z",
"name": "AUTHORIZATION_CREATED",
"node": {
"id": "TRANSACTION_ID",
"approvedAmount": {
"value": 20000
},
"__typename": "AuthorizationEvent"
}
}
},
{
"node": {
"id": "NOTIFICATION_EVENT_ID",
"createdAt": "2021-11-19T19:12:25.912Z",
"expiresAt": "2021-12-19T19:12:25:912Z",
"name": "AUTHORIZATION_CREATED",
"node": {
"id": "TRANSACTION_ID",
"approvedAmount": {
"value": 12000
},
"__typename": "AuthorizationEvent"
}
}
}
]
}
}
}
Fetch individual events
You can fetch individual events using the following query and the notification event id as an input:
Event
Query
query Event($id: ID!) {
node(id: $id) {
__typename
... on NotificationEvent {
__typename
id
createdAt
expiresAt
name
node {
... on AuthorizationEvent {
id
approvedAmount {
value
}
}
}
}
}
}
Variables
{
"id": "NOTIFICATION_EVENT_ID"
}
⚠️ Please login to execute queries. Visit the dashboard to authenticate.
Result
{
"node": {
"__typename": "NotificationEvent",
"id": "NOTIFICATION_EVENT_ID",
"createdAt": "2022-03-03T15:46:44.944Z",
"expiresAt": "2022-04-03T15:46:44:944Z",
"name": "AUTHORIZATION_CREATED",
"node": {
"id": "TRANSACTION_ID",
"approvedAmount": {
"value": 0
}
}
}
}