get__node

GET /node

List Nodes

Get all available Flashgate nodes. Returns a structured response with success status, data array, and total count.

Query Parameters

Name
Type
Required
Description

nodeServices

number

yes

Filters nodes by service flag using a bitwise AND operation. If 0, all nodes are returned.

Service Flags (BridgeTypes.ServiceFlag)

The nodeServices parameter uses a bitwise flag mode to filter nodes based on their capabilities. The available flags defined in the enum are:

  • SERVICE_FLAG_NONE = 0 (Returns all nodes)

  • SERVICE_FLAG_STORAGE = 1

  • SERVICE_FLAG_AILLM = 2

  • SERVICE_FLAG_CHAT = 4

To query for multiple services at once, combine them using the bitwise OR (|) operator.

Example: For example, if you want to list all storage and aillm nodes, you must pass: ?nodeServices=BridgeTypes.ServiceFlag.SERVICE_FLAG_STORAGE | SERVICE_FLAG_AILLM (Note: In raw HTTP requests, this evaluates to the integer 3)

TypeScript Client Library

// Using the Flashgate TypeScript client
import { FlashgateClient, BridgeTypes } from '@flashgate/client';

const client = new FlashgateClient({
  accessToken: 'your-access-token'
});

// Get all storage and AI LLM nodes
try {
  const result = await client.nodes.list({
    nodeServices: BridgeTypes.ServiceFlag.SERVICE_FLAG_STORAGE | BridgeTypes.ServiceFlag.SERVICE_FLAG_AILLM
  });
  console.log('Available nodes:', result);
} catch (error) {
  console.error('Failed to retrieve nodes:', error);
}

Code Samples

Example responses

200 Response

Responses

Status
Meaning
Description
Schema

200

Nodes retrieved successfully

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Indicates if the request was successful

» data

[NodeInfo]

false

none

Array of available nodes

» total

number

false

none

Total number of nodes returned

NodeInfo Object

Name
Type
Required
Restrictions
Description

» nodeServices

number

false

none

Service capability flags of the node

» url

string

false

none

Endpoint URL of the node

» ip

string

false

none

IP address of the node

» region

string

false

none

Geographic region of the node

» version

string

false

none

Version of the node software

» status

string

false

none

Current status of the node

» lastUpdated

string(date-time)

false

none

Last update timestamp

Last updated

Was this helpful?