Agent Nodes

List Files.com Agent nodes

SDK Method

remote_server.AgentNodes()

Return Values

Returns a files_sdk.AgentNode value and an error.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator, a Workspace Administrator for the relevant workspace, or a user with an Integration-Centric file system layout managing their own Remote Servers.

RemoteServerAgentNodesParams Fields

FieldDescription
Id
int64
Required
Remote Server ID.

Example Request

import (
    "fmt"
    "errors"

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

agentNode, err := remote_server.AgentNodes(files_sdk.RemoteServerAgentNodesParams{Id: 1})
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(agentNode)

The AgentNode Object

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

AttributeDescription
NodeId
string
Stable Agent installation ID
Name
string
Customer-configured Agent node name
Hostname
string
Hostname reported by the Agent
AvailabilityRole
string
Configured traffic preference
Possible values: primary, auto, standby
Status
string
Whether this node currently has an available Agent instance
Possible values: available, unavailable
IsDefault
boolean
Whether this node is the current default route for new unscoped work
DirectTransferAvailable
boolean
Whether the proxy recently validated a direct connection to this Agent node. False means direct transfers are enabled but not currently available; null means disabled or unsupported.
LastSeenAt
date-time
Most recent successful node observation
Instances
array(object)
Current Agent processes for this node