Definition
Parameter | Type | Required? | Description |
---|---|---|---|
page_cursor | string | Pagination cursor, value is the object ID. | |
page_size | number | Limits the number of objects in the returned list, value must be a number greater than or equal to 1. Defaults to 100 . | |
from_date | string | Lists the objects created on the date provided and onwards. Date must be in ISO 8601 format (“YYYY-MM-DD”). | |
to_date | string | Lists the objects created before the date provided. Date must be in ISO 8601 format (“YYYY-MM-DD”). |
Example Request
Example Response
Common Questions About Pagination:
-
How do I page through results in Treasury Prime’s API?
- To paginate through results, utilize the
page_cursor
parameter in your API requests. This cursor points to a specific item in the dataset, enabling you to retrieve subsequent data segments.
- To paginate through results, utilize the
-
What is the best way to paginate API responses?
- The recommended approach is to start with an initial request without the
page_cursor
parameter to fetch the first set of results. The API response will include apage_next
field containing a URL with thepage_cursor
for the next set of results. Use this cursor in your subsequent requests to continue paging through the dataset.
- The recommended approach is to start with an initial request without the
-
How does Treasury Prime handle pagination with large data sets?
- Treasury Prime’s API returns lists in reverse chronological order, displaying the most recently created items first. By using the
page_cursor
andpage_size
parameters, you can control the flow and volume of data retrieved, ensuring efficient handling of large datasets.
- Treasury Prime’s API returns lists in reverse chronological order, displaying the most recently created items first. By using the
-
What parameters should I use for cursor-based pagination?
page_cursor
: A string representing the ID of the last item from the previous set of results. Include this in your request to fetch the next set.page_cursor
: An optional parameter to define the number of items returned per request. The default is 100, but it can be adjusted to meet your needs.