Identify public shared files/folders
I am trying to distinguish shared and non-shared files/folders from the parent folder. Is there any way to identify only shared files or folders from the parent folder using box python SDK. I am using the get_shared_link() file object attribute, it returns share file URL but it also generates a shared link if it does not exist. As per my requirement, I am expecting to get the null value if the file/folder object is not already shared.
Thanks!
-
Hi ,
Yep, you sure can using the get items in folder endpoint. By default you won't get the information you need from the base call, but set the "fields" parameter to get more of the file object data - I might suggest "id,type,name,has_collaborations,shared_link" for this case.
In the above, the sharing items called out would be:
- has_collaborations: will be false if no collaborators are added, otherwise will show true.
- shared_link: will be null if no shared link has been created, or will return a shared link object if it is shared.
Hopefully that will provide everything you may need,
Jon
サインインしてコメントを残してください。
コメント
1件のコメント