0

I am able to pull in the data I need with using part of this sEndPoint

Main folder I'm pulling from:

https://company.sharepoint/sites/Site/_api/Web/GetFolderByServerRelativeUrl('Folder Name')?

Selecting File types:

$select=Folders/Folders/Folders/Folders/Files/ListItemAllFields/File_x0020_Type

Expanding Files from folders:

&$expand=Folders/Folders/Folders/Folders/Files/ListItemAllFields

Filtering file type to be equal to 'xls'

&$filter=(Folders/Folders/Folders/Folders/Files/ListItemAllFields/File_x0020_Type eq 'xls')

However, I am only trying to pull back file types of xls. This and a lot of other variations of this is what I was trying to use to get it to work, but it just brings all files back regardless.

I have tried filter=ListItemAllFiels/File_x0020_Type and also tried substringof and also tried just File_x0020_Type.

It might just be a faster pull to just pull Files/__metadata.id and just split all the parent folders and file name and extensions from this. I am currently just trying to make the pull faster, but it seems like adding ListItemAllFields is about 3x slower.

Anyway, even if it is slower I would like to learn.

Thanks!

-Joe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.