Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
响应具有返回结果的顺序,但是否可以在请求中设置顺序?
执行 Get a Folder's Items 时可以设置限制和偏移量,但如果无法提供订单,此功能似乎不完整。
根据文档示例,可以设置限制和偏移 URL 参数。
curl https://api.box.com/2.0/folders/FOLDER_ID/items?limit=2&offset=0 \ -H "Authorization: Bearer ACCESS_TOKEN"
不幸的是,目前无法自定义 API 返回的项目的顺序。
limit 和 offset 参数用于对大型数组进行分页,因为一个文件夹可能有数千个项目,这些项目不能在单个响应中全部返回。