Download from Populi to a file
populi_downloadSave Populi API routes, PDF/XLS/CSV exports, transcripts, reports, and paginated lists to files instead of returning them, keeping large results out of the conversation.
Instructions
GET a Populi route and save the response to a file in the files folder instead of returning it. Use it for routes that return files (PDF/XLS/CSV exports, transcripts and grade reports, Data Slicer results, file and backup downloads, images) and to keep a big list or full export out of the conversation (use all_pages). Takes the same arguments as populi_get. Never overwrites: an existing name gets -1, -2, ... appended. Returns the saved path and a short preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page of results, 1-based. With all_pages, the page to start from | |
| path | Yes | Route under /api2, with real ids, e.g. /people/24469940/leads | |
| limit | No | Records per page | |
| expand | No | Related properties to include | |
| filter | No | Populi filter object (list routes) | |
| params | No | Any other documented parameters for the route (sort, report options, format, ...) | |
| save_as | No | File name to save under (no folders). Defaults to the name Populi suggests, or a timestamp | |
| all_pages | No | Follow pagination and merge every page into one list | |
| timeout_ms | No | Per-request timeout. Raise for slow reports and exports (default 120000) | |
| max_records | No | With all_pages: stop once at least this many records are collected (the last page is kept whole). The result says whether it finished and, if not, the next_page to continue from |