User Security Events

A UserSecurityEvent is a log record for user security activity such as user lockouts.

List User Security Events

SDK Function

UserSecurityEvent.list()

Return Object

ListIterator<UserSecurityEvent>

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.UserSecurityEvent;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<UserSecurityEvent> userSecurityEvents = UserSecurityEvent.list(parameters);
  for (UserSecurityEvent userSecurityEvent : userSecurityEvents.listAutoPaging()) {
    // Operate on userSecurityEvent
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show User Security Event

SDK Function

UserSecurityEvent.find()

Return Object

UserSecurityEvent

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDescription
id
int64
Required
User Security Event ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.UserSecurityEvent;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  UserSecurityEvent userSecurityEvent = UserSecurityEvent.find(id, parameters);
  // Operate on userSecurityEvent
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The UserSecurityEvent Object

Some of the functions above return a UserSecurityEvent object. The attributes of this object are listed below.

AttributeDescription
id
int64
Event ID
event_type
string
Type of user security event being recorded.
Possible values: lockout
body
string
Event body.
event_errors
array(string)
Event errors.
created_at
date-time
Event create date/time.
body_url
string
Link to log file.
user_id
int64
User ID.