Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Pagination using the http json api serviceForum ↗

Pagination using the http json api service

App Development4 posts635 views2 likesLast activity Dec 2020
LA
lashenhurstOP
Dec 2020

Hey guys,

As the title suggests, I’m trying to look in to pagination whilst using the json api service. In particular, I’m looking at the best ways to present contracts of a certain template to a UI. Of course I do not want to receive all X thousand instances of a template for every user request to view a certain page, preferably I would want the first Y contracts, sorted by a defined data field.

I can’t see anything in the docs for this sort of request, is such functionality available, or should this type of action be handled in a different manner?

Thanks in advance!

CO
cocreature
Dec 2020

Hi @lashenhurst, at the moment there is no support for pagination in the JSON API. There is an open issue for this if you want to track it Support for paginated queries in JSON API · Issue #6595 · digital-asset/daml · GitHub. In the meantime, you can either try limiting it to subsets by trimming down your queries or you can explore whether the streaming API might fit your usecase better.

LA
lashenhurst
Dec 2020

Thanks for getting back to me! That issues seems to have been open for quite a while, is there a date in mind for when this might be addressed?

CO
cocreature
Dec 2020

We don’t have a timeline for this feature at this point.

← Back to Discussions