View Notification history

📜 GetNotificationHistory and onGetNotificationsHistory

🔍 Overview

The getNotificationHistory API fetches historical notifications acted upon by the user. It supports filters like date range, keyword, status, and action performed.

The response is received asynchronously via the onGetNotificationsHistory event.


🔗 Method Signature

Parameters

ParameterTypeDescription
recordCountNumberNumber of records to fetch (0 = all)
enterpriseIDStringOptional, can be empty if not used
startIndexNumberShould be ≥ 1
startDateStringFormat: yyyy-MM-dd'T'HH:mm:ssz, optional
endDateStringFormat: yyyy-MM-dd'T'HH:mm:ssz, optional
notificationStatusStringFilter by status (e.g., EXPIRED, UPDATED)
actionPerformedStringFilter by action taken (Accept, Reject, etc.)
keywordSearchStringSearch string across notifications
deviceIDStringFilter by specific device ID

🎯 Event: onGetNotificationsHistory

This event is triggered after calling getNotificationHistory. Notifications are provided in:response.pArgs.response.ResponseData.history.


📋 Fields in onGetNotificationsHistory Payload

FieldTypeDescription
notification_uuidStringUnique identifier for the notification
statusStringFinal status of the notification: EXPIRED, UPDATED, TAMPERED, etc.
signing_statusStringSignature validation status: Verified, Failed, NA
action_performedStringAction taken by user, e.g., Accept, Reject, Fraud
update_tsStringTimestamp of user action or system update (ISO format)
create_tsStringTime the notification was generated (ISO format)
expiry_timestampStringExpiry time of the notification (ISO format)
bodyArrayLocalized content (subject/message pairs), each with:
lngStringLanguage code of the message content (e.g., "English")
subjectStringNotification title shown to the user
messageStringNotification body message
actionsArrayList of possible actions (rare in history; mostly used in active notif)
labelStringText to show on the button (e.g., "Accept")
actionStringAction value (e.g., accept, reject)
authlevelStringAuthentication level needed (usually "0" for most)
ds_requiredBooleanWhether digital signature was required

🔖 Notification Status Values

StatusMeaning
EXPIREDNotification was not acted upon within the configured expiry window
UPDATEDNotification has been updated after user interaction
TAMPEREDNotification data was found altered during validation
DISMISSEDNotification was dismissed or cleared by the user or system
NEWFresh notification at time of generation (used internally, not in history)

🛡️ Digital Signing Status (signing_status)

StatusMeaning
VerifiedSignature associated with the notification was validated successfully
FailedSignature validation failed (possible tampering or integrity loss)
NANot applicable (e.g., non-signing notifications or legacy messages)

💡 Sample Response Snippet

{
  "errCode": 0,
  "eMethId": 16,
  "pArgs": {
    "response": {
      "ResponseData": {
        "total_count": 10,
        "history": [
          {
            "notification_uuid": "2ceeefa0-6e50...",
            "status": "EXPIRED",
            "signing_status": "NA",
            "action_performed": "Accept",
            "create_ts": "2024-10-23T06:19:51UTC",
            "expiry_timestamp": "2024-10-23T06:22:50UTC",
            "update_ts": "2024-10-23T06:21:00UTC",
            "ds_required": false,
            "actions": [
              {
                "label": "Accept",
                "action": "accept",
                "authlevel": "1"
              },
              {
                "label": "Reject",
                "action": "reject",
                "authlevel": "0"
              }
            ],
            "body": [
              {
                "lng": "English",
                "subject": "Additional Device Activation Request",
                "message": "You are attempting to activate a new device. Please Accept or Reject."
              }
            ]
          }
        ]
      }
    }
  }
}

📲 Code Snippets (in collapsible menu)

📱 React Native
RdnaClient.getNotificationHistory(
  0, "", 1, "", "", "", "", "", "",
  (syncResponse) => {
    console.log("GetNotificationHistory sync response", syncResponse);
  }
);

RdnaClient.on("onGetNotificationsHistory", (event) => {
  console.log("onGetNotificationsHistory", event);
});
📱 Flutter
rdnaClient.getNotificationHistory("0", "", "1", "", "", "", "", "", "");

rdnaClient.on(RdnaClient.onGetNotificationsHistory, (data) {
  print("onGetNotificationsHistory: $data");
});
📱 Cordova
com.uniken.rdnaplugin.RdnaClient.getNotificationHistory(
  function(success) {
    console.log("History success", success);
  },
  function(error) {
    console.error("History error", error);
  },
  [0, "", 1, "", "", "", "", "", ""]
);
📱 Native Android
RDNAError err = rdna.getNotificationHistory(
  0, "", 1, "", "", "", "", "", ""
);

@Override
public void onGetNotificationsHistory(RDNAStatusGetNotificationHistory status) {
  Log.d("SDK", "onGetNotificationsHistory: " + status.toString());
}
📱 Native iOS
RDNAError* err = [rdna getNotificationHistory:0
                            withEnterpriseID:@""
                               withStartIndex:1
                               withStartDate:@""
                                 withEndDate:@""
                      withNotificationStatus:@""
                       withActionPerformed:@""
                         withKeywordSearch:@""
                               withDeviceID:@""];

- (void)onGetNotificationsHistory:(RDNAStatusGetNotificationHistory *)status {
    NSLog(@"onGetNotificationsHistory: %@", status);
}