# Paginated list

Code: /lessons/[Paginated\_list](https://github.com/trilloapps/trillo-tutorial/tree/main/lessons/Paginated_list)

Steps

1. This lesson uses the Customer table created above.
2. Select Customer table > API tab > /api/v1.1/data/page API.
3. Exercise API with default parameters.
4. See the list of customers in the result section
5. **Next steps are using the Trillo Function. Since you will be writing code using Java, you may want to keep the** [**Trillo Workbench Java SDK**](https://trillo.gitbook.io/trillo-workbench-java-sdk/) **open.**
6. Create a function using IDE or WB UI.
7. Write code using DSApi.getPage api.

* &#x20;DSApi.getPage takes DataRequest as a parameter.
* Initialize DataRequest. (see appendix for its definition).
* Iterate through pages until all records (or N number of records) are read.
* Add a few log statements to print results. (see appendix for info on logs).

8. Execute function
9. Review response

### Similar Concepts

| Concept                        | Description                                                                                                                                                   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Several retrieve APIs of DSApi | There are APIs to retrieve a single or collection of records. The collection of records may also have nested related objects making it a tree data structure. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench-lessons/begin-code-lessons/paginated-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
