3416

Filter folder listing based on date

Question:

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.

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

Answer1:

You can do this via the search API. See both the blog post <a href="http://blog.box.com/2014/05/powering-advanced-search-with-the-box-platform/" rel="nofollow">here</a>, as well as the doc <a href="http://developers.box.com/docs/#search" rel="nofollow">here</a>. 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.

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 "Authorization: Bearer ACCESS_TOKEN"

Recommend

  • a simple question about lib folder in Eclipse
  • SWIFT uiviewcontroller init
  • Webpage with wide iframe is not scrollable on an iPhone with viewport
  • fonts in tables rendering inconsistently on mobile browsers
  • how to get DAYS absent from working days from given date range?
  • Apple review objection Invalid directory name for Plugins folder (Child Browser Cordova)
  • How to enforce project-wide unique ids/error codes for easily finding the origin of the error in sou
  • Can wso2 data service return affected rows after SQL update?
  • Adaptive Triggers in Resource Dictionary
  • How to extract a plane from a 3D variable in FiPy (3D to 2D)
  • How to blur the specific part of image without using Render Script,as my minsdk is 14.
  • Return null in boolean to checkbox state converter in XAML
  • When executing an array of tasks asynchronously, shouldn't it take as long as the longest runni
  • Azure table query partial partitionkey guid match
  • SIP API media codecs
  • Does Apportable support to build library binary (.a/.so)?
  • How to revert to previous XCode version?
  • Not able to aggregate on nested fields in elasticsearch
  • Ajax calls do not work in IE unless you fiddle with security settings
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • Keep this build forever option - Jenkins
  • How to attach a node.js readable stream to a Sendgrid email?
  • Yii2: Config params vs. const/define
  • PostgreSQL Query without WHERE only ORDER BY and LIMIT doesn't use index
  • NetLogo BehaviorSpace - Measure runs using reporters
  • Spring security and special characters
  • recyclerView does not call the onBindViewHolder when scroll in the view
  • Incrementing object id automatically JS constructor (static method and variable)
  • JSON with duplicate key names losing information when parsed
  • How to show dropdown in excel using jrxml (jasper api)?
  • Hazelcast - OperationTimeoutException
  • How to get next/previous record number?
  • RestKit - RKRequestDelegate does not exist
  • Confusion with PayPal's monthly billing cycle
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Revoking OAuth Access Token Results in 404 Not Found
  • Free memory of cv::Mat loaded using FileStorage API
  • C# - Getting references of reference
  • unknown Exception android
  • How to Embed XSL into XML