how to list all items published for a particular key in MC V2

+1 vote
Just going through the docs to record stream data and wanted to find a simple way to list all of the past stream items for a set key eg:

 

publish kyc '["24","PH","bank"]' '{"json":{"status":"kyc1","limit":"100000"}}'

publish kyc '["24","PH","bank"]' '{"json":{"status":"kyc2","limit":"200000"}}'

publish kyc '["24","PH","bank"]' '{"json":{"status":"kyc3","limit":"300000"}}'

 

and so on as that person's data record was updated. If i cannot get the stream items posted date and time, I would add that to the data

I can get the first posted item using noupdate, and the last one by default - how do I list all of the items?

Also, how do i search and retrieve data based on a search for more than one key?..ie: all stream items that are from a country (in this case UK instead of PH), with type EMI instead of bank...we need to filter items...
asked Feb 1, 2018 by mark
edited Feb 1, 2018 by mark

1 Answer

0 votes

If you want to list all the items, just use liststreamkeyitems (this API is also available in MultiChain 1.0) and not getstreamkeysummary.

I'm afraid the current MultiChain 2.0 alpha does not provide a way to search on the intersection of two keys. Your workaround for now would be to add extra pseudo-keys which will help with this future retrieval, e.g. for any item with the key PH and bank, also add an additional key PH-bank.

answered Feb 1, 2018 by MultiChain
...