Skip to main content
Question

Fetching particular Folder items (for type=file) after a specific date.

  • May 23, 2025
  • 3 replies
  • 15 views

Forum|alt.badge.img

I have hit a dead end as I was trying to fetch files for a specific folder after a specific date.

Below is the API call which i had made with a developer token:

BOX2_lKsic1VMI9dFz0hK2A-dMQ.png

In above image as it is seen, Folder Id, Folder Name is given with a specific date range but in response 0 items are returned but there are files present which lie in that date range which is:  updated_at_range=2021-05-15T13:35:01-07:00,2023-01-20T13:35:01-07:00


Also refer below attachment as to proof as file sits in this particular folder of this specific range: 
BOX2_blyHfD-KWgOSwbjyZ4tajA.png

Please let me know what mistake am I doing ? or an explanation what's wrong and how can i achieve my GOAL to Fetch particular Folder items (for type=file) after a  specific date of a particular Folder.

3 replies

Forum|alt.badge.img

Hi,

This can have multiple reasons, none of them related with "doing something wrong", and it could be as simple as ehe user that created the developer token does not have access to the file.

So if you just search the content of the parent folder (without any more parameters), does it list the file?

if so this means the search parameters are incorrect or the search hasn't indexed the file (unlikely if the file has not been created in the last few minutes).

If you list the contents of the folder (as opposed to search) does it list the file? 

If not this means the user associated with the API token does not have permissions to access the file.

Let us know.


Forum|alt.badge.img

Okay, 
I checked user have access to this file.
I am getting this file when I list the item of the file using folder id.
BOX2_wM6EKa0NVhBJEduMHu4r5w.png
If u think search parameters were incorrect. 
please point out where I am doing it wrong.
The API call was : 

https://api.box.com/2.0/search?query=Autotest&ancestor_folder_ids=190051656573&fields=id,name&type=file&updated_at_range=2021-05-15T13:35:01-07:00,2023-01-20T13:35:01-07:00

Please let me know.


Forum|alt.badge.img

It looks fine to me.

If you apply that type of filter to any other content, does it find it?