PublicAPI icon indicating copy to clipboard operation
PublicAPI copied to clipboard

Getting all of the donations from an endpoint?

Open Gegbee opened this issue 2 years ago • 1 comments

Is there a way to get all the donations from the donor drive API endpoint? The array return from a GET request seems to be limited to 100 with setting the limit URL parameter.

Thanks, Greg

Gegbee avatar Jun 27 '22 01:06 Gegbee

You have to paginate through the results 100 at a time by using the offset query parameter. You can check while paginating for the presence of the Next property in the response to see if there are more records, and you can use the Num-Records property to double-check that you got all of them at the end of your query loop. https://github.com/DonorDrive/PublicAPI/blob/master/overview.md#array-based-endpoints

Zosoled avatar Jul 13 '22 00:07 Zosoled