Skip to main content
POST
/
api
/
ledger
/
v2
/
{ledger}
/
logs
/
import
cURL
curl --request POST \
  --url http://localhost/api/ledger/v2/{ledger}/logs/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '
{
  "file": "<string>"
}
'
{
  "errorCode": "VALIDATION",
  "errorMessage": "[VALIDATION] invalid 'cursor' query param",
  "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
}
Import logs from a backup or another ledger. Used for disaster recovery and ledger migration scenarios.

Parameters

ledger: The name of the ledger to import logs into. (e.g., ledger001)

Request Body

Binary log data to import. Typically obtained from the Export Logs endpoint.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

ledger
string
required

Name of the ledger.

Example:

"ledger001"

Body

application/octet-stream
file
file
required

Response

Import OK