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.

Example Request

import RemoteServer from 'files.com/lib/models/RemoteServer';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const remoteServer = new RemoteServer();
  await remoteServer.agentNodes();
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

The AgentNode Object

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

AttributeDescription
node_id
string
Stable Agent installation ID
name
string
Customer-configured Agent node name
hostname
string
Hostname reported by the Agent
availability_role
string
Configured traffic preference
Possible values: primary, auto, standby
status
string
Whether this node currently has an available Agent instance
Possible values: available, unavailable
is_default
boolean
Whether this node is the current default route for new unscoped work
direct_transfer_available
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.
last_seen_at
date-time
Most recent successful node observation
instances
array(object)
Current Agent processes for this node