History Export Results

A HistoryExportResult is a single record with historical information about actions that happened in your site. Results can be obtained as a part of History Export request.

List History Export Results

SDK Method

historyexportresult.List()

Return Object

[]*HistoryExportResult

Authorization Requirement

Available to all authenticated keys or sessions.

HistoryExportResultListParams Fields

FieldDescription
UserId
int64
User ID. Provide a value of 0 to operate the current session's user.
HistoryExportId
int64
Required
ID of the associated history export.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    history_export_result "github.com/Files-com/files-sdk-go/v3/historyexportresult"
)

historyExportResultIterator, err := history_export_result.List(files_sdk.HistoryExportResultListParams{HistoryExportId: 1})
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 historyExportResultIterator.Next() {
    historyExportResult := historyExportResultIterator.historyExportResult()
}
err = historyExportResultIterator.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 HistoryExportResult Object

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

AttributeDescription
Id
int64
Action ID
CreatedAt
int64
When the action happened
CreatedAtIso8601
string
When the action happened, in ISO8601 format.
UserId
int64
User ID
FileId
int64
File ID related to the action
ParentId
int64
ID of the parent folder
Path
string
Path of the related action. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
Folder
string
Folder in which the action occurred
Src
string
File move originated from this path
Destination
string
File moved to this destination folder
Ip
string
Client IP that performed the action
Username
string
Username of the user that performed the action
UserIsFromParentSite
boolean
true if this change was performed by a user on a parent site.
Action
string
What action was taken. Valid values: create, read, update, destroy, move, login, failedlogin, copy, user_create, user_update, user_destroy, group_create, group_update, group_destroy, permission_create, permission_destroy, api_key_create, api_key_update, api_key_destroy, archived_delete
FailureType
string
The type of login failure, if applicable. Valid values: expired_trial, account_overdue, locked_out, ip_mismatch, password_mismatch, site_mismatch, username_not_found, none, no_ftp_permission, no_web_permission, no_directory, errno_enoent, no_sftp_permission, no_dav_permission, no_restapi_permission, key_mismatch, region_mismatch, expired_access, desktop_ip_mismatch, desktop_api_key_not_used_quickly_enough, disabled, country_mismatch, insecure_ftp, insecure_cipher, rate_limited
Interface
string
Interface through which the action was taken. Valid values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim, office, mobile, as2, inbound_email, remote, inbound_s3
TargetId
int64
ID of the object (such as Users, or API Keys) on which the action was taken
TargetName
string
Name of the User, Group or other object with a name related to this action
TargetPermission
string
Permission level of the action
TargetRecursive
boolean
Whether or not the action was recursive
TargetExpiresAt
int64
If searching for Histories about API keys, this is when the API key will expire. Represented as a Unix timestamp.
TargetExpiresAtIso8601
string
If searching for Histories about API keys, this is when the API key will expire. Represented in ISO8601 format.
TargetPermissionSet
string
If searching for Histories about API keys, this represents the permission set of the associated API key
TargetPlatform
string
If searching for Histories about API keys, this is the platform on which the action was taken
TargetUsername
string
If searching for Histories about API keys, this is the username on which the action was taken
TargetUserId
int64
If searching for Histories about API keys, this is the User ID on which the action was taken