Get Security Threat Logs

🔒 getSecurityThreatLogs API

💡 Overview

The getSecurityThreatLogs API allows mobile applications to retrieve historical threat data detected by the REL-ID SDK. This is useful for security auditing, threat resolution, or providing users with transparency around security activities on their device.

🔍 Purpose

This API fetches logs of previously detected security threats. These can be analyzed to understand patterns or respond to security incidents reported by end users.

🗓 User Experience: Recommended UI Screen

  • A Security Logs screen should be presented to the user listing all historical threats.
  • Each entry should show:
    • 🔎 Threat Name
    • ⚠️ Severity (e.g. LOW, MEDIUM, HIGH)
    • 🗓️ Timestamp (based on log order)
    • 📅 Category (SYSTEM, NETWORK, APPLICATION)
    • ✉️ Description/message
  • Optionally, allow users to view expanded details for appInfo or networkInfo if present.

📁 API Reference

✅ Platforms

React Native
RdnaClient.getSecurityThreatLogs(startIndex, totalCount, (syncResponse) => {});
Flutter
rdnaClient.getSecurityThreatLogs(<int startIndex, int count>);
Cordova
com.uniken.rdnaplugin.RdnaClient.getSecurityThreatLogs(
  successCallback(responseString),
  errorCallback,
  [<int startIndex, int count>]
);
Native iOS
(RDNAError *)getSecurityThreatLogs:(int)startIndex withCount:(int)count 
  withThreatLogs:(RDNAThreatLogDetails **)threatLogs;
Native Android
RDNAStatus<RDNAThreatLogDetails> getSecurityThreatLogs(Context context, int startIndex, int count);

🔎 Parameters

ParameterTypeDescription
startIndexIntegerIndex from which to begin fetching logs
totalCountIntegerNumber of records to fetch (-1 for all)

↪️ Return Type

  • Success: List of RDNAThreatLogDetails
  • Failure: Error object

🔢 Response Payload Fields

FieldTypeDescription
threatIdintUnique identifier for the threat
threatNamestringName of the detected threat
threatMsgstringDetailed description of the threat
threatReasonstringAdditional context or reason if applicable
threatCategorystringSYSTEM, NETWORK, APPLICATION
threatSeveritystringLOW, MEDIUM, HIGH
configuredActionstringDefault action (REPORT, TERMINATE, etc.)
appInfoobject{appName, appSha256, packageName} if app threat
networkInfoobject{ssid, bssid, maliciousAddress, maliciousMacAddress} if network threat
shouldProceedWithThreatsboolUser action to proceed
rememberActionForSessionboolRemember this action for the session

🔢 Possible Values

threatSeverity

ValueDescription
LOWMinimal risk threat
MEDIUMModerate threat
HIGHCritical threat

configuredAction

ValueMeaning
REPORTReport to user
TERMINATESDK should terminate session

❌ Error Codes and Actions

Error CodeDescriptionAction Required
1000Invalid parametersValidate and retry with correct values
1001No threat logs foundShow empty state screen
1002SDK not initializedInitialize SDK first
1003Internal SDK errorRetry or contact support
1004Unauthorized accessRe-authenticate or logout