admin_datadir
The datadir administrative property can be queried for the absolute path the running Klaytn node currently uses to store all its databases. The default path is different depending on the node types (kcn, kpn, and ken) and the OS type.
JSONRPC: admin_datadir
Request
- application/json
Body
method stringrequired
Default value: admin_datadir
Method name
id int64required
Default value: 1
Request ID, Random or Auto incrementation
jsonrpc stringrequired
Default value: 2.0
JSON-RPC Version (2.0)
params array
Responses
- 200
The datadir path.
- application/json
- Schema
- Example (from schema)
Schema
jsonrpc stringrequired
Default value: 2.0
id int64required
error
object
result string
The datadir path.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": "/your/dir/ken/data/dd"
}
- curl
- python
- nodejs
- java
- CURL
curl -L -X POST 'http://localhost:8551/admin/datadir' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"method": "admin_datadir",
"id": 1,
"jsonrpc": "2.0",
"params": [
null
]
}'
ResponseClear