How to Download shared folders files which is latest means todays date... Nested item from shared folder

  • 1
  • Question
  • Updated 7 months ago
  • (Edited)
we are using the documentation code under c#
https://api.sharefile.com/rest/samples/csharp.aspx

here i am able to get personal folders item id to pass it to download function but shared folders item id is not fetching via GetRoot Function of the c# Code 
need a c# code that will help in to download the shared folders latest file
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like

Posted 7 months ago

  • 1
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 713 Posts
  • 99 Reply Likes
Imran,

The request to get the shared folders is 

GET https://account.sf-api.com/sf/v3/Items(allshared)/Children

You can create a function using the samples as a base and that would get you the Shared folders.

Let me know if that helps,

Thanks!
Eli
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like
What about nested folders...if I want to download a particular folder or files only based on name or date....

E.g if my parent shared folder is Client and within there are multiple folder of different client name and I want to download a particular client files only or a files that uploaded on a particular date
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 713 Posts
  • 99 Reply Likes
Imran,

We support filter parameters so you can specify the entities you want returned on your request. See the Odata documentation for examples, under "Common Query Parameters": http://api.sharefile.com/rest/index/odata.aspx
Photo of Imran

Imran

  • 10 Posts
  • 1 Reply Like
we tried passing this String uri = string.Format("https://{0}/sf/v3/Items(allshared)/Children?$filter=substringof('abc', FileName) eq true", ShareFileV3Sample.GetHostname(token));

but it is not working