Skip to main content

Shutdown

Shuts down the node. Optionally performs a full blockchain scan before shutting down. Requires admin password. This is a POST-only endpoint.

Request

POST /nxt?requestType=shutdown&adminPassword=<adminPassword>&scan=<boolean>

Parameters

NameTypeRequiredDescription
scanbooleanNoIf true, performs a full blockchain scan before shutdown. Defaults to false.
adminPasswordstringConditionalAdmin password required if nxt.adminPassword is set.

Response

{
"shutdown": true
}

Response Fields

FieldTypeDescription
shutdownbooleantrue if the shutdown was initiated.

Notes

  • This endpoint does not require the blockchain to be running (requireBlockchain = false).
  • Not chain-specific.
  • Requires admin password authentication (requirePassword = true).
  • Requires POST method (requirePost = true).
  • If scan = true, invokes fullScanWithShutdown() instead of directly calling System.exit(0).

Source: Shutdown.java.

Example

curl -X POST "http://localhost:22024/nxt" \
-d "requestType=shutdown" \
-d "adminPassword=mySecretPassword" \
-d "scan=false"