Fetching particular Folder items (for type=file) after a specific date.
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:
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:
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.
-
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.
-
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.
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:00Please let me know.
Please sign in to leave a comment.
Comments
3 comments