Retrieve Pruned Data
Schedules a background task to restore pruned data from random peers with the PRUNABLE service. The nxt.maxPrunableLifetime property determines which data is retrieved. Requires admin password. This is a POST-only endpoint.
Request
POST /nxt?requestType=retrievePrunedData&adminPassword=<adminPassword>&chain=<chainId>
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
chain | integer | Yes | Chain ID for which to retrieve pruned data. |
adminPassword | string | Conditional | Admin password required if nxt.adminPassword is set. |
Response
{
"done": true,
"numberOfPrunedData": 5
}
Response Fields
| Field | Type | Description |
|---|---|---|
done | boolean | true if retrieval was scheduled successfully. |
numberOfPrunedData | integer | Number of pruned data items retrieved. |
Error Responses
| Condition | Response |
|---|---|
| Runtime exception during retrieval | Error response from JSONData.putException() |
Notes
- This endpoint does not require the blockchain to be running (
requireBlockchain = false). - Requires admin password authentication (
requirePassword = true). - Requires POST method (
requirePost = true). - Retrieves data from random peers that provide the
PRUNABLEservice.
Source: RetrievePrunedData.java.
Example
curl -X POST "http://localhost:22024/nxt" \
-d "requestType=retrievePrunedData" \
-d "adminPassword=mySecretPassword" \
-d "chain=0"