feat: enhance API responses with pagination support and model updates#152
feat: enhance API responses with pagination support and model updates#152Joffref wants to merge 3 commits into
Conversation
- Updated the API methods for listing agents, sandboxes, drives, functions, jobs, and job executions to support cursor-based pagination. - Refactored response parsing to return structured lists (e.g., AgentList, SandboxList, DriveList, FunctionList, JobList, JobExecutionList) instead of raw arrays. - Added new parameters for cursor, limit, sort, and anchor to improve query flexibility and response handling. - Updated documentation to reflect changes in response structure and pagination capabilities. This change improves the API's usability and aligns with the latest versioning standards.
🧪 Testing GuideWhat this PR addressesThis PR adds cursor-based pagination support to all 35 list API methods in the SDK (agents, sandboxes, drives, functions, jobs, models, policies, volumes, etc.). List methods now return structured wrapper objects (e.g., Steps to exercise the new behavior
What to verify (expected behavior)
Note Posted by PR Testing Guide · Tag @mendral-app with feedback. |
There was a problem hiding this comment.
LGTM
The previously flagged from_dict guard issue has been fully resolved — all *List models now handle bare arrays via isinstance(src_dict, list) wrapping, None via early return, and empty dicts safely. No new issues found.
Tag @mendral-app with feedback or questions. View session
This change improves the API's usability and aligns with the latest versioning standards.
Note
Adds cursor-based pagination to all list endpoints (agents, sandboxes, drives, functions, jobs, job executions). Return types change from
list[T]to structuredTListobjects withdataandmetafields. New query parameterscursor,limit,sort,q, andanchorare threaded through all four call variants. The code is auto-generated from an OpenAPI spec. Two follow-up commits hardened the generated client to handle bare-array responses from older API versions and preserve theJobExecutionListwrapper contract.Written by Mendral for commit 78aad04.