Debug Operations
All debug utilities require an adminPassword request parameter. See Admin Password for more info.
Clear Unconfirmed Transactions
Empties the unconfirmed transaction pool. POST only.
Request:
requestTypeisclearUnconfirmedTransactions
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Clear Unconfirmed Transactions example.
Dump Peers
Get all active peers, optionally of a certain version or a minimum weight.
Request:
requestTypeisdumpPeersversionis a version filter such as1.5.11(optional)weightis a minimum weight filter such as 1000 (optional)connectistrueto force a connection attempt to each known peer first (optional); password protected like the Debug Operations iftrue
Response:
peers(S) is a string of peer IP addresses or DNS names, separated by semicolonscount(N) is the number of peers in thepeersstring.requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Dump Peers example.
Full Reset
Deletes the entire blockchain. POST only.
Request:
requestTypeisfullReset
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Note: After successful completion of the reset, a new blockchain will automatically begin downloading.
Example: Refer to Full Reset example.
Get All Broadcasted Transactions
Get unconfirmed transactions broadcasted from this node but not yet received back from a peer, if transaction rebroadcasting is enabled.
Request:
requestTypeis -getAllBroadcastedTransactions`requireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
Response:
transactions(A) is an array of broadcasted unconfirmed transactions not yet received back from a peer (S)lastBlock(S) is the last block ID on the blockchain (applies ifrequireBlockis provided but notrequireLastBlock)requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get All Broadcasted Transactions example.
Get All Waiting Transactions
Get unconfirmed transactions temporarily kept in memory during transaction processing.
Request:
requestTypeisgetAllWaitingTransactionsrequireBlockis the block ID of a block that must be present in the blockchain during execution (optional)requireLastBlockis the block ID of a block that must be last in the blockchain during execution (optional)
Response:
transactions(A) is an array of unconfirmed transactions temporarily kept in memory (S)lastBlock(S) is the last block ID on the blockchain (applies ifrequireBlockis provided but notrequireLastBlock)requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get All Waiting Transactions example.
Get Log
Get up to 100 of the most recent log messages from a memory buffer.
Request:
requestTypeisgetLogcountis the number of messages to return (optional, default 100)
Response:
messages(A) is an array of log messages (S)requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Get Log example.
Get Stack Traces
Get the stack traces of the currently running threads in reverse id order.
Request:
requestTypeisgetStackTracesdepthis the maximum trace depth to retrieve (optional)
Response:
requestProcessingTime(N) is the API request processing time (in millisec)locks(A) is an array of lock objectsthreads(A) is an array of thread objects with the following fields:trace(A) is an array of traces (S)name(S) is the thread nameid(N) is the thread IDstate(S) is the thread state, one ofWAITING,TIMED\WAITINGandRUNNABLE`locks(A) is an array of lock objects with the following fields, if not empty:trace(S)depth(N)name(S)hash(N)
Example: Refer to Get Stack Traces example.
Lucene Reindex
Forces a rebuild of the Lucene search index. POST only.
Request:
requestTypeisluceneReindex
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Lucene Reindex example.
Pop Off
Removes specified number of blocks (and associated transactions) from the top of the blockchain. POST only.
Request:
requestTypeispopOffnumBlocksis the number of blocks to pop off the blockchain (optional)heightis the new height of the blockchain after popping (optional ifnumBlocksprovided)
Note: If table trimming is enabled (default), at most 1440 blocks can be popped off without triggering a full rescan.
Response:
blocks(A) is an array of the blocks popped off (refer to Get Block for details)requestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Pop Off example.
Rebroadcast Unconfirmed Transactions
Rebroadcast transactions in the unconfirmed pool to peers, until received back or found in the blockchain. Rebroadcasting can be disabled by setting the nxt.enableTransactionRebroadcasting property to false. POST only.
Request:
requestTypeisrebroadcastUnconfirmedTransactions
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Rebroadcast Unconfirmed Transactions example.
Requeue Unconfirmed Transactions
Requeue unconfirmed transactions. POST only.
Request:
requestTypeisrequeueUnconfirmedTransactions
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Requeue Unconfirmed Transactions example.
Retrieve Pruned Data
Initiates a task of requesting and restoring missing prunable data. POST only.
Request:
requestTypeisretrievePrunedData
Response:
done(B) istrueif the operation completed successfullynumberOfPrunedData(N) is the number of pruned data available pruned data transactionsrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Retrieve Pruned Data example.
Scan
Scans the top of the blockchain. POST only.
Request:
requestTypeisscannumBlocksis the number of blocks to scan at the top of the blockchain (optional)heightis the height above which blockchain is to be scanned (optional ifnumBlocksprovided)validateistrueif signatures are to be re-verified and blocks and transactions re-validated (optional)
Note: The derived object tables are rolled back and rebuilt by rescanning the existing blockchain. A request to rescan more than 1440 blocks when table trimming is enabled will do a full rescan starting from height 0. Rescan status is saved in the database, so that if a rescan is interrupted or fails it will resume on restart.
Response:
scanTime(N) is the scan timedone(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Scan example.
Set Logging
Sets the log level and optionally specifies communication events to be logged, without restarting the server. POST only.
Request:
requestTypeissetLogginglogLevelis one ofERROR,WARN,INFOorDEBUGwith each level in the list including all of the previous levels (optional, default is -iNFO`)communicationEventis one of multiple communication (HTTP) events to be logged, from the list:EXCEPTION,HTTP-ERROR,HTTP-OK(optional)communicationEventis one of multiple communication events (optional)
⋮
Note: The initial log level is set by the nxt.level logging property, currently FINE (equivalent to DEBUG).
Response:
loggingUpdated(B) istrueif the operation completed successfully
Example: Refer to Set Logging example.
Shutdown
Shutdown the server. POST only.
Request:
requestTypeisshutdownscanistrueto truncate the derived tables and schedule a full rescan with validation on the next start (optional)
Response:
shutdown(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Shutdown example.
Trim Derived Tables
Trigger a derived tables trim, and a prunable tables pruning. POST only.
Request:
requestTypeistrimDerivedTables
Response:
done(B) istrueif the operation completed successfullyrequestProcessingTime(N) is the API request processing time (in millisec)
Example: Refer to Trim Derived Tables example.