根据日期过滤文件夹列表 [英] Filter folder listing based on date

查看:97
本文介绍了根据日期过滤文件夹列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前文件夹列表API调用将响应文件夹的所有内容/项目。我需要根据日期过滤文件夹的内容。例如,我想列出所有在2014年10月5日之后更新/创建的文件或在2014年2月5日至2014年4月4日之间更新/创建的文件。而不是列出文件夹的所有项目。

The current folder listing API call responds with all the contents/items of folder. I have a requirement to filter the contents of a folder based on date. For example I would like to list all the files that were updated/created after 10/05/14 or files updated/created between 2/05/14 to 4/05/14. Instead of listing all the items of a folder.

您能告诉我BOX api调用是否已支持此功能?

Can you kindly let me know if this is already supported in BOX api calls?

推荐答案

您可以通过搜索API执行此操作。请在此处 ,以及文档此处。有一些参数可指定要搜索的各种参数,包括要查看的项目类型(文件,文件夹,Web链接),特定的父文件夹(ancestor_folder_ids)或几个不同的日期字段。

You can do this via the search API. See both the blog post here, as well as the doc here. There are parameters to specify a wide variety of parameters to search for including type of item to look at (file, folder, weblink), specific parent-folders (ancestor_folder_ids), or a couple different date fields.

例如,您可以使用此curl cmd查找仅在2014年5月15日太平洋标准时间下午1:35到2014年5月17日太平洋标准时间下午1:35之间更新的pdf文件

For example, you could look for only pdf's updated between 15 May 2014 at 1:35PM PST and 17 May 2014 at 1:35PM PST with this curl cmd

curl https://api.box.com/2.0/search?query=sales&file_extensions=pdf&updated_at_range=2014-05-15T13:35:01-07:00,2014-05-17T13:35:01-07:00 \

-H授权:承载ACCESS_TOKEN

-H "Authorization: Bearer ACCESS_TOKEN"

这篇关于根据日期过滤文件夹列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆