How to fetch shared files list in API ?
Hello,
I want to fetch lists of shared files with my account using API reference. And also need to filter with "email" that use in files to share. Is there any way or solution to get this type of files list or can be filter ?
I want to approach this type of functionality using API.
Thanks.
-
Hi ,
We don't current have a method for retrieving all shared links directly through the APIs. Essentially you'll need to do one of two things:
1. Using the get files in a folder endpoint, loop through all items in a folder. You'll have to create a recursive structure with that endpoint to loop through subfolders. With each file, use the get file information (or get folder info) endpoint to get the shared link. The shared link structure will look something like this:
"shared_link": { "access": "open", "download_count": 3, "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg", "effective_access": "company", "effective_permission": "can_download", "is_password_enabled": true, "permissions": { "can_download": true, "can_preview": true }, "preview_count": 3, "unshared_at": "2018-04-13T13:53:23-07:00", "url": "https://www.box.com/s/vspke7y05sb214wjokpk", "vanity_url": "https://acme.app.box.com/v/my_url/" },
That probably won't have the exact data that you're looking for, but you can see the type of information that we send back about the shared link.
2. The second option is to use the admin reports, but you'll need admin access to the enterprise to get this data. On the admin console report page there is a "Shared Links" report. This will give you a full list of all shared links in the enterprise, but won't have an extensive amount of data available about each. You could use that data in turn with the get info about shared link endpoint to get information on the file / folder.
Hope that helps,
Jon
サインインしてコメントを残してください。
コメント
1件のコメント