Automation Application Actions

List actions available for an Automation application

SDK Method

automation.ListApplicationActions()

Return Values

Returns a *automation.Iter and an error. All() returns iter.Seq2[any, error] because this package has listings that return different resource types. This operation yields files_sdk.AutomationApplicationAction values. Use a type assertion or type switch to access their fields. Check each loop error before using its resource. Next() and Err() remain supported.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

AutomationListApplicationActionsParams Fields

FieldDescription
ApplicationKey
string
Required
Application key returned by the Automation applications list.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

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

automationApplicationActionIterator, err := automation.ListApplicationActions(files_sdk.AutomationListApplicationActionsParams{ApplicationKey: "application_key"})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Printf("API error (%s): %s\n", respErr.Type, respErr.ErrorMessage)
    } else {
        fmt.Printf("Request failed: %v\n", err)
    }
    return
}

for automationApplicationAction, err := range automationApplicationActionIterator.All() {
    if err != nil {
        var respErr files_sdk.ResponseError
        if errors.As(err, &respErr) {
            fmt.Printf("API error (%s): %s\n", respErr.Type, respErr.ErrorMessage)
        } else {
            fmt.Printf("Request failed: %v\n", err)
        }
        return
    }
    fmt.Println(automationApplicationAction)
}

The AutomationApplicationAction Object

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

AttributeDescription
Application
AutomationApplication
Application that provides the action.
Key
string
Stable action key within the application.
Name
string
Action display name.
Description
string
What the action does.
Fingerprint
string
Fingerprint of the action contract shown to the author.
Fields
array(object)
Normalized input fields.
Output
object
Normalized output schema.
Origins
array(string)
HTTPS origins supported by this action.
Authentication
array(object)
Authentication types accepted by this action.