Reputation: 7
I like to use the rest API to breakroleinheritance of a folder. It works fine when you have the FolderServerRelativeUrl.
In my case i have only the itemID of the Folder. How i can get FolderServerRelativeUrl by item id. In the data of the Item i couldn't found it.
Thanks
Upvotes: 0
Views: 4656
Reputation: 59358
At least the following options are available:
FileRef
property of ListItem
resource: https://servername/_api/web/lists/getbytitle('<list title>')/items(<item id>)?$select=FileRef
ServerRelativeUrl
property of Folder
resource that
is associated with a folder item:
https://servername/_api/web/lists/getbytitle('<list title>')/items(<item id>)/folder?$select=ServerRelativeUrl
Upvotes: 1