I need to enum directories and documents in SP 2013. I need only those the user works with (no system or web files) To get initial lists omitting non-user ones I inquire
/_api/Web/Lists?$filter=BaseType+eq+1 and Hidden+eq+false and IsPrivate+eq+false and IsCatalog+eq+false
Than - what to do better? I have 2 options:
Get
/_api/Web/Lists(guid'GUID')/Items, chose those withFileSystemObjectType eq 0for files andFileSystemObjectType eq 1for folders, and then arrange folders into tree using relative paths (e.g. for folder1="/A/B" and folder2="/A/B/C" assume that folder2 lays inside folder1)
PS: filtering with neither/_api/Web/Lists(guid'GUID')/Items?$filter=FileSystemObjectType eq 0nor/_api/Web/Lists(guid'GUID')/Items?$filter=FileSystemObjectType+eq+0does not work for meGet
/_api/Web/Lists(guid'GUID')/RootFolderand continue navigating with
/_api/Web/GetFolderByServerRelativeUrl(FOLDER_PATH)/Folders,/_api/Web/GetFolderByServerRelativeUrl(FOLDER_PATH)/Files and/_api/Web/GetFileByServerRelativeUrl(FOLDER_PATH)
Any other option?
Thank you

0 commentaires:
Enregistrer un commentaire