#dida-java-list

1 messages · Page 1 of 1 (latest)

terse trenchBOT
somber schooner
#

dida-java-list

#

Is there a way I can get the count of the records found ?
=> You get a list, you loop over the list, you count elements as you loop
Is there a way I can get a dump of the records in JSON?
=> Seems like the same question as this morning which I already answered

digital mortar
#

Thanks for the earlier response. That worked.

#1. Let's say there are 350 records in total.
How can I retrieve the next 101 - 200 ?

#2 . I was wondering if there can be a dump of all 350 records

somber schooner
#

you can't retrieve all, this is unscalable. Like what if you had 10 millions payments last month

#

you paginate through and you build your list in memory or in a file or something and you count as you go

digital mortar
#

ok.

#

Is there no way to guage the records count, before retrieving them ?

somber schooner
#

not via a list API no. Otherwise we'd have to count through millions of objects too just to return the first 100.

digital mortar
#

What am I missing here ?

somber schooner
#

did you read the docs for what parameters are allowed?

digital mortar
somber schooner
#

you don't pass created, you pass query as a search query you write in test

somber schooner
#

not sure what you mean, that just links to Postman doing a PI retrieve

digital mortar
#

Well, this is good example on how to send the requests.

brittle slate
#

Hi @digital mortar I'm taking over this thread

digital mortar
#

I was able to get this to work. However, I have to send requests using the 'next_page' value.

Am I on the right track, or is there an alternate ?

#

Thanks Jack!!!!

#

Let me know if you want me to refresh my questions...

#

(Just to summarize )
Use Case :
Let's say there are 350 records in total.
Question :
#1 How can I retrieve the count of ALL the records before retrieving the data?
#2. Can I get the result set without passing the 'next_page' as suggested by Koopajah. (We expect no more than 1000 records)

Any suggestions would be great.

brittle slate
digital mortar
#

Exactly what I needed. Thank you!!!!!

#

Is there a way I can test the "autoPageIterable" via the Postman or it can be done only via JAVA ?

#

'Since curl simply emits raw HTTP requests' found this...

brittle slate
#

auto pagination is feature we provides in Stripe libraries, so you need to use one of the libraries

digital mortar
#

Thank you Jack Tan. Appreciate your patience and the guidance.