TriportRPC

admin_datadir

Last updated:

`admin_datadir` returns the path of the directory where the backing node keeps its chain data and node-level state. It takes no parameters and returns a single string.

This method belongs to the `eth_peergraph` category and is restricted to the **Business** tier. It is an operational / introspection call — useful when you are correlating node identity and topology data (alongside `admin_nodeInfo` and `admin_peers`) rather than serving end-user requests. The returned path reflects the node serving your request and is informational only; you cannot use it to read files remotely.

Parameters

This method takes no parameters.

Returns

admin_datadir return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"admin_datadir","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "admin_datadir",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"admin_datadir","params":[],"jsonrpc":"2.0"})
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 1 per call.

FAQ

What does admin_datadir do?
Returns the absolute filesystem path of the data directory the Ethereum node is using to store its chain data.
How many credits does admin_datadir cost?
admin_datadir costs 1 credit(s) per call on Triport by default.
Is admin_datadir available over WebSocket?
admin_datadir is an HTTP JSON-RPC method.