List all proprerties of client.file get returns?
AnsweredHow can I list all properties that client.file.get returns?
TIA
myfile = client.file(my_id).get()
-
Official comment
Anything beyond the standard file response requires the fields parameter to be filled out. Note that if you send in that parameter, you will need to pass in every field you want returned.
Thanks,
Alex, Box Developer Advocate
Comment actions -
Is that the Python SDK you are using? I'm sure there is a way to "walk" the object and pretty print the contents, but I'm not a Python expert.
Are you familiar w/ the developer docs though? They show an example response and it appears to be pretty fully populated:
https://developer.box.com/reference/get-files-id/#response-example -
I have a script. However it takes about 2 seconds to get info from file.
The ".get()" takes about 2 seconds for ONE file. I have thousands of files.
If someone knows of a faster way, please send me a snippet. I only need for each file in my folder.
A. Filename
B Created_at
count = 0
item3s = client.folder(folder_id=fol_id).get_items()
for it3 in item3s:
file_id = it3['id']
file_info = client.file(file_id).get()
Please sign in to leave a comment.
Comments
3 comments