I have a document library with multiple level folder structure, I want to fetch the server relative URL of individual folder by their name.
For example: Folder structure in lib like this: Document Library > Folder => subfolder1 => subfolder2
If I pass Name='Folder', it should return /Document Library/Folder
If I pass Name='subfolder2', it should return /Document Library/Folder/subfolder1/subfolder2
I tried below restAPI:
_api/web/lists/GetByTitle('Documents')/RootFolder?$expand=Folders/Folders&$Filter=Name eq 'subfolder2'
But it returns extra folder details as well.
Any extra parameter I can add to my rest URL to filter out extra folder details?