Skip to main content
Question

List all proprerties of client.file get returns?

  • May 22, 2025
  • 3 replies
  • 22 views

Forum|alt.badge.img

How can I list all properties that  client.file.get returns?

 

TIA

myfile = client.file(my_id).get()

3 replies

Forum|alt.badge.img

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


Forum|alt.badge.img

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


Forum|alt.badge.img

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()