servers
Introduction
The servers method is a diagnostic endpoint used to retrieve a real-time list of all remote servers (or peers) that the DLT node has initiated an outbound connection to.
This method is the counterpart to the clients endpoint. While clients shows who is connected to this node, servers shows who this node is connected to. It is primarily intended for node operators and developers for monitoring network health, debugging connectivity issues, and administrative purposes.
Request
This method does not accept any parameters. Requests can be made using either HTTP POST or HTTP GET.
Example POST Request
POST /servers
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "servers",
"params": {},
"id": 1
}
Example GET Request
GET /servers
Response
The response result is a JSON array of strings, with each string representing the network address of a connected server.
Result Structure
The result is an array where each element is a string in the format IP_ADDRESS:PORT.
Example Success Response
{
"jsonrpc": "2.0",
"result": [
"192.168.1.10:10205",
"172.115.33.4:10205"
],
"id": 1,
"error": null
}
Behavioral Notes
- Outbound vs. Inbound Connections: This endpoint is the counterpart to the
clientsmethod.serverslists all the peers that this node has actively connected to (outbound connections). In contrast,clientslists all the peers that have connected to this node (inbound connections). - Real-Time Data: The returned list is a snapshot of the active outbound connections at the moment the request is processed.
- Diagnostic Use: This endpoint is a valuable tool for operators to verify that their node can successfully connect to the rest of the Ixian network.