Getting another enterprise's folder id via API search?
I'm trying to grab public files made available here:
https://app.box.com/v/2016OPDDailyLogs
but
client.search('2016OPDDailyLogs',result_type='folder',limit=100, offset=0)
returns an empty list. how should I get this folder's ID?
-
Hello,
Thanks so much for using our platform and development forum!
The folder ID is 8881124638.
You can find this on your own by navigating into this folder in the webapp and taking a look at the end of the URL. For example, https://kourtneybiz.app.box.com/folder/38348454731. The folder ID would be 38348454731. However, you would need to be added as a collaborator and not just accessing the content via a shared link in order to do this.
Best,
Kourtney
-
Thanks ! (but did you just agree to be Box's 411 service for anyone else searching for public files like this?!)
and this isn't working for me:
root_folder = client.folder(folder_id='***number removed for privacy***8').get()
returns
boxsdk.exception.BoxAPIException: Message: Not Found Status: 404 Code: not_found Request id: rsj4zsfvhut5bw1u Headers: {'Date': 'Fri, 21 Sep 2018 21:11:31 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'BOX-REQUEST-ID': '067fvr0nutri959s65o953d6fb', 'Age': '1'} URL: https://api.box.com/2.0/folders/***number removed for privacy***8 Method: GET Context info: {'errors': [{'reason': 'invalid_parameter', 'name': 'item', 'message': "Invalid value 'd_8881124638'. 'item' with value 'd_8881124638' not found"}]}
same behavior if i give the folder ID as an int vs. string.
and same behavior on one of the subfolders (2018 --> ***number removed for privacy***06)?
-
Yes, this is where the different collaborator levels come into play. You will want to take a look at the table on this page:
These correspond to what's passed into the 'role' body parameter of the create collaboration endpoint.
-
thanks for these details , I appreciate them.
but i guess you are also saying that Box does not provide any "read world" permissions on stored files? the Collaborator level makes it seems as if the (Oakland Police Department) data provider would need to enumerate all potential readers (eg, City of Oakland citizens) to allow them API access?
サインインしてコメントを残してください。
コメント
6件のコメント