Add documentation for listing API

Add parameter to define for the sorting criteria of the returned blobs. @xla 
As there is some nested conditions here which are not simple to pick and understand it would be good to describe the intended behaviour of the function, especially as it seems certain errors are ignored.

Helper functions go by convention to the very bottom of the file.