Sharefile Users API, Top Folders and Expand Children is not returning correct results

  • 1
  • Problem
  • Updated 3 weeks ago
  • (Edited)
I am authenticating and getting token of an admin user.
I am then fetching a client's "ID" using email.
I am then calling:
<domain>.sf-api.com/sf/v3/Users(<ID>)/TopFolders?$expand=Children

I am expecting only those subfolders to be listed as per access to the User specified in the "ID".
Instead all subfolders are listed.
Photo of Sahil Shah

Sahil Shah

  • 5 Posts
  • 0 Reply Likes

Posted 3 months ago

  • 1
Photo of Sahil Shah

Sahil Shah

  • 5 Posts
  • 0 Reply Likes
No replies since a week. Can anyone update us?
Photo of Suh Sai

Suh Sai

  • 21 Posts
  • 5 Reply Likes
It should be a bug. Let me see if we have plan to fix it.
Photo of Sahil Shah

Sahil Shah

  • 5 Posts
  • 0 Reply Likes
Any update on when can we expect a fix. We have a project pending on this requirement.
Photo of Suh Sai

Suh Sai

  • 21 Posts
  • 5 Reply Likes
Hi Sahil,

Sorry for my late response.

The /sf/v3/Users(userId)/TopFolders is designed to return top folders for the given userId. And the expand=Children is going to list all subfolders under the top folder.
If you want to check user's permission on the folder, you should use /sf/v3/AccessControls
http://api.sharefile.com/rest/docs/resource.aspx?name=AccessControls

Hopefully, this helps your project.

Best Regards,
Suh
Photo of Sahil Shah

Sahil Shah

  • 5 Posts
  • 0 Reply Likes
Hello Suh Sai,

I do not want to check user's permission on folder. I want to list all folders for a given userid, via an admin token.

"The /sf/v3/Users(userId)/TopFolders is designed to return top folders for the given userId. And the expand=Children is going to list all subfolders under the top folder."

I agree to your above statement. But this is not happening when you call the APIĀ /sf/v3/Users(userId)/TopFolders?$expand=Children with token of an admin user. It is listing all subfolders from all users instead that particular user specified in userid.

How, can we expedite to solve this bug?

Regards,
Sahil.