Last updated
Edit

node_to_shard

[Source]

The node_to_shard method manages copying data from the ledger store to the shard store. It can start, stop, or check the status of copying the data.

The node_to_shard method is an admin method that cannot be run by unprivileged users.

Request Format

An example of the request format:

{
    "command": "node_to_shard",
    "action": "start"
}

The request includes the following parameters:

FieldTypeDescription
actionStringEither start, stop or status depending on what action to take.

Response Format

An example of a successful response:

{
  "result": {
    "message": "Database import initiated..."
  },
  "status": "success",
  "type": "response"
}

The response follows the standard format, with a successful result containing the following fields:

FieldTypeDescription
messageStringA human-readable message indicating the action taken in response to the command.

Possible Errors

  • Any of the universal error types.
  • internal - If you attempt an invalid operation like checking the status of a copy when one isn't running.
  • notEnabled - If the server is not configured to store history shards.
  • invalidParams - One or more fields are specified incorrectly, or one or more required fields are missing.