When calling SharePoint list api's whether it be CSOM, Rest and Soap apis, they all refer to server relative urls without escaping for URLs.

When you are using the apis, inevitably you want the characters to be encoded so that you can use that URL to fetch the document library files, etc.

Is there a way to get SharePoint to return usable URLs so I don't have to write this sort of algorithm?


Try this: /_api/web/lists/getbytitle('ListTitle')/items(itemId)?$select=EncodedAbsUrl

The field EncodedAbsUrl is also available in SharePoint-Object models.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.