Skip to main content

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

NameTypeRequiredDescription
chainintegerYesChain ID for which to retrieve pruned data.
adminPasswordstringConditionalAdmin password required if nxt.adminPassword is set.

Response

{
"done": true,
"numberOfPrunedData": 5
}

Response Fields

FieldTypeDescription
donebooleantrue if retrieval was scheduled successfully.
numberOfPrunedDataintegerNumber of pruned data items retrieved.

Error Responses

ConditionResponse
Runtime exception during retrievalError 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 PRUNABLE service.

Source: RetrievePrunedData.java.

Example

curl -X POST "http://localhost:22024/nxt" \
-d "requestType=retrievePrunedData" \
-d "adminPassword=mySecretPassword" \
-d "chain=0"