question

sp13test-6829 avatar image
0 Votes"
sp13test-6829 asked Jerryzy edited

FileLeafRef/FileRef in Items Rest endpoint

I'm using /items to get the library items:

var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Documents')/items

But I can't find FileLeafRef/FileRef property in the response.

Is there anyway to get these property ?

Thanks in advance.

office-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Jerryzy avatar image
1 Vote"
Jerryzy answered Jerryzy edited

Hi @sp13test-6829 ,

Try to modify the endpoint like this, add $select:

var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Documents')/items?$select=*,FileLeafRef,FileRef

Thanks
Best Regards



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.