Closed cschaba closed 1 month ago
Hi @cschaba,
The command you are performing corresponds to this API call
If you want to obtain a specific field that is not returned by default, you need to specify it in the fields
parameter.
As for the possible fields
that can be passed in the fields parameter, they can be any of the available fields of the returned resources.
Since List items in folder returns three resources file
, folder
, weblink
, you can find the possible fields here:
file: https://developer.box.com/reference/resources/file--full/
folder: https://developer.box.com/reference/resources/folder--full/
weblink: https://developer.box.com/reference/resources/web-link/
In your case, since you are interested in the update date
, you need to pass the corresponding field which is modified_at
described here.
So the final query should look like this:
box folders:items --as-user=123456789 --sort=date --json --fields=type,id,name,created_at,modified_at 123456789
Regards, Artur
@arjankowski Thank you very much for your reply. Using modified_at
instead of updated_at
works for me. Thanks for pointing to the "full" documentation.
Maybe there is some potential to update the CLI Docs with this links?
I wonder which date field is used when using the --sort=date
.
Is it created_at
or modified_at
?
Thanks 👍
@cschaba I'm glad that this solved your problem.
When it comes to --sort=date
It looks like it uses the created_at
date.
Description of the Issue
I want to create a list of files for a folder and what to output the
updated_at
field, but it's missing in the output. Other fields, likecreated_at
are shown correctly.Steps to Reproduce
I wonder also where to find a complete list of valid fields, I took the example output of https://developer.box.com/reference/resources/file-request/ as reference, is that the right source?
I also wonder which date field for the
--sort=date
option is used. Is itcreated_at
orupdated_at
?Expected Behavior
I would expect the
updated_at
field in the output.Versions Used
Box CLI: @box/cli/3.14.1 darwin-x64 node-v14.19.3 Operating System: MacOS 15.0