User SFTP Client Uses

A UserSftpClientUse is a way to see the exact set of SFTP clients used by a given user.

List User SFTP Client Uses

SDK Function

UserSftpClientUse.list()

Return Object

ListIterator<UserSftpClientUse>

Authorization Requirement

Not available to user API keys or sessions from users that are marked as Shared/Bot users.

Function Arguments

ArgumentDescription
user_id
int64
User ID. If provided, will return uses for this user.

Additional Arguments

Example Request

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

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("user_id", 1);
  
  ListIterator<UserSftpClientUse> userSftpClientUses = UserSftpClientUse.list(parameters);
  for (UserSftpClientUse userSftpClientUse : userSftpClientUses.listAutoPaging()) {
    // Operate on userSftpClientUse
  }
} 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 UserSftpClientUse Object

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

AttributeDescription
id
int64
UserSftpClientUse ID
sftp_client
string
The SFTP client used
created_at
date-time
The earliest recorded use of this SFTP client (for this user)
updated_at
date-time
The most recent use of this SFTP client (for this user)
user_id
int64
ID of the user who performed this access