Welcome to the new Box Support website. Check out all the details here on what’s changed.

API seach date range abnomal

Answered
New post

Comments

2 comments

  • BB_Jake

     if you look at the search documentation (https://developer.box.com/reference#searching-for-content) , the `query` parameter is mandatory which is why you are having an issue with your first example as you have `query` set to blank.

    In your 2nd example, you have just set the `query` parameter to 'updated_at_range=2018-10-01T00:00:00-07:00,2018-10-31T23:59:59-...' and are not actually using the `updated_at_range` parameter i believe. 

     

    From the documentation it seems like there is 1 exception for the `query` parameter to not be used and that's by using the `mdfilters` parameter which only searches for files that are associated with specific metadata templates. If all of the files you are looking for are associated with a set of specific metadata templates you may be able to use that along with the `updated_at_range` parameter.

    Something like this :

    GET https://api.box.com/2.0/search?updated_at_range=2018-01-01T04:00:00+0000,2018-10-29T03:00:00+0000&mdfilters=[{"templateKey":"","scope":"enterprise","filters":{}}]
    0
    Comment actions Permalink
  • mwiller

     As  mentioned, the Search API requires a query term.  If you just want a list of all items that have changed since a certain date, the Events API is the correct way to get that information.

    0
    Comment actions Permalink

Please sign in to leave a comment.