Agent Nodes

List Files.com Agent nodes

SDK Method

remoteserver.AgentNodes()

Return Object

AgentNode

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

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.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

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