Why can't I view the data field of an item properly on a stream?

+1 vote
I've published two items to stream: one is large and other is small. When I list items in stream, the data field of small one seems ok. I can simple parse it and retrieve the original value I published. However, when I check the large one all I see is 3 fields:size,txid,vout. I can't see the data I submitted.

In the link below you can see the result of my liststreamitems(stream-name). First item in the list is the large one and second is the small one.

https://gist.github.com/TinfoilHat0/98227ca89ab2e55c66c058b36a3bd79b
asked Aug 27, 2018 by TinfoilHat

1 Answer

+1 vote
 
Best answer

See the maxshowndata runtime parameter and gettxoutdata API. There's a customizable limit on the size of data returned by various APIs, to avoid huge API responses where you don't want them. (Remember that offchain stream items can be up to 1 GB in size, which would create a 2 GB hexadecimal API response!)

answered Aug 28, 2018 by MultiChain
selected Aug 30, 2018 by TinfoilHat
I see. How can I fetch the data correctly in this case?
Use the gettxoutdata API.
...