traverseiterator Method
Gets the Iterator value from session
and Iterator id
returned by invokefunction or invokescript .
[!Note]
This method queries Iterator type data and does not affect the blockchain data.
You must install the plugin RpcServer before you can invoke the method.
Before you can use the method, make sure that the
SessionEnabled
value inconfig.json
of the pluginRpcServer
istrue
, and you have obtainedIterator id
andsession
by invoking invokefunction or invokescript.
Parameters
session: Cache id. It is
session
returned by invokefunction or invokescript .iterator id: Iterator data id. It is the
id
ofstack
returned by invokefunction or invokescript.count: The number of values returned. It cannot exceed the value of the
MaxIteratorResultItems
field in config.json of theRpcServer
plug-in.
[!Note]
The validity of the
session
anditerator id
is set bySessionExpirationTime
in theconfig.json
file of theRpcServer
plug-in, in seconds.
Example
Request body:
Response body:
Response Description:
The result is the first count
of data traversed in the Iterator, and follow-up requests will continue traversing from count + 1
.