admin_datadir
https://api.triport.io/v1/ethReturns the absolute filesystem path of the data directory the Ethereum node is using to store its chain data.
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. Send an empty params array.
——optionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
jsonrpc | string | JSON-RPC protocol version, always "2.0". |
id | number | string | Echoes the request id. |
result | string | Absolute path of the node's data directory. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | Your plan is below the Business tier required for admin_datadir. The error data includes current_tier, required_tier, and an upgrade_url. |
-32003 | rate_limited | You exceeded the 20 RPS limit for this method. The error data includes limit_rps, burst_capacity, and retry_after_sec. |
-32005 | unauthorized | The API key is missing, malformed, or invalid. |
Example error envelope (tier too low):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32002,
"message": "tier insufficient for method admin_datadir",
"data": {
"method": "admin_datadir",
"category": "eth_peergraph",
"chain": "eth",
"current_tier": "pro",
"required_tier": "business",
"upgrade_url": "https://api.triport.io/upgrade"
}
}
}See errors.md for the full error envelope and the shared error-code reference.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/eth", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "admin_datadir",
params: [],
}),
});
const { result } = await res.json();
console.log(result); // "/var/lib/ethereum/data"TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY });
const dataDir: string = await client.eth.request("admin_datadir", []);
console.log(dataDir);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
data_dir = client.eth.request("admin_datadir", [])
print(data_dir)Notes
- No parameters and no pagination — the response is a single string.
- Requires the Business tier; a lower tier returns
-32002(tier_insufficient). - Related Business-tier admin methods in the same
eth_peergraphcategory: admin_nodeInfo and admin_peers. - Rate limiting is RPS-per-tier with burst; there is no daily quota.