Bundle Actions

A BundleAction is an action performed on a bundle. Provides detailed information about the action's type, involved paths and other information.

List Bundle Actions

SDK Method

bundleaction.List()

Return Object

[]*BundleAction

Authorization Requirement

Available to all authenticated keys or sessions.

BundleActionListParams Fields

FieldDescription
UserId
int64
User ID. Provide a value of 0 to operate the current session's user.
BundleId
int64
Bundle ID
BundleRegistrationId
int64
Bundle Registration ID

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

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

bundleActionIterator, err := bundle_action.List(files_sdk.BundleActionListParams{UserId: 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 bundleActionIterator.Next() {
    bundleAction := bundleActionIterator.bundleAction()
}
err = bundleActionIterator.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 BundleAction Object

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

AttributeDescription
Action
string
Type of action
Possible values: create, read, update, destroy, move, copy, registration
BundleRegistration
BundleRegistration
Object that contains bundle registration information
CreatedAt
date-time
Action occurrence date/time
Destination
string
The destination path for this bundle action, if applicable
Path
string
Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
Source
string
The source path for this bundle action, if applicable
BundleRegistrationId
int64
Identifier of the associated bundle registration
WorkspaceId
int64
Workspace ID. 0 means the default workspace.
BundleRegistrationName
string
Name of the registrant who performed the action
BundleRegistrationEmail
string
Email of the registrant
BundleRegistrationIp
string
IP address of the registrant
FormFieldSetId
int64
Id of associated form field set
FormFieldData
object
Data for form field set with form field ids as keys and user data as values