FTP Action Logs

An FtpActionLog is an audit log for monitoring and troubleshooting operations made to your site through FTP protocol.

Logs available through this endpoint are retained for 6 months, after which they are automatically discarded. For longer retention, use Files.com SIEM integrations to stream logs in real time to your preferred SIEM, or configure SIEM streaming to a file.

List FTP Action Logs

SDK Method

ftpactionlog.List()

Return Object

[]*FtpActionLog

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 (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    ftp_action_log "github.com/Files-com/files-sdk-go/v3/ftpactionlog"
)

ftpActionLogIterator, err := ftp_action_log.List(files_sdk.FtpActionLogListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for ftpActionLogIterator.Next() {
    ftpActionLog := ftpActionLogIterator.ftpActionLog()
}
err = ftpActionLogIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The FtpActionLog Object

Some of the methods above return a FtpActionLog object. The attributes of this object are listed below.

AttributeDescription
Timestamp
date-time
Start Time of Action. Deprecrated: Use created_at.
RemoteIp
string
IP Address of FTP Client
ServerIp
string
IP Address of FTP Server
Username
string
Username
SessionUuid
string
Unique ID of the Session
SeqId
int64
FTP Sequence ID
AuthCiphers
string
Authentication Ciphers
ActionType
string
Action Type
Path
string
Path as sent by the Client (may not match Files.com path due to user root folders for FTP). This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
TruePath
string
Path on Files.com
Name
string
Name of File
Cmd
string
FTP Command Name
Param
string
FTP Command Param
ResponseCode
int64
FTP Response Code
ResponseMessage
string
FTP Response Message
EntriesReturned
int64
Number of entries returned when listing files and folders
Success
boolean
Whether FTP Action was successful.
Status
string
FTP Action status.
Possible values: SUCCESS, FAILURE, PARTIAL_TRANSFER
DurationMs
int64
Duration (in milliseconds)
CreatedAt
date-time
Start Time of Action