Automation Logs

An AutomationLog is an audit log for monitoring and troubleshooting triggered Automation.

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 Automation Logs

SDK Method

automationlog.List()

Return Object

[]*AutomationLog

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"
    automation_log "github.com/Files-com/files-sdk-go/v3/automationlog"
)

automationLogIterator, err := automation_log.List(files_sdk.AutomationLogListParams{})
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 automationLogIterator.Next() {
    automationLog := automationLogIterator.automationLog()
}
err = automationLogIterator.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 AutomationLog Object

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

AttributeDescription
Timestamp
date-time
Start Time of Action. Deprecrated: Use created_at.
AutomationId
int64
Automation ID
AutomationRunId
int64
Automation Run ID
CorrelationId
string
Logical item correlation ID
DestPath
string
Destination path, for moves and copies
ErrorType
string
Typed error, if applicable
SourceAutomationId
int64
ID of the Automation whose definition owns this node
SourceAutomationVersion
int64
Pinned version of the Automation whose definition owns this node
Message
string
Message
NodeId
string
Node ID
NodeType
string
Node type
Operation
string
Operation type
Possible values: as2_send, copy, delete, import_file, items_emitted, mkdir, move, node_finished, node_started, perform_as2_send, run_sync, save_url, wait
Output
string
Node outlet used by the item
Path
string
File path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
Status
string
Status
Possible values: success, failure, skipped, retried_failure
CreatedAt
date-time
Start Time of Action