FileLeafRef/FileRef in Items Rest endpoint

sp13test 281 Reputation points
2021-03-30T06:46:23.733+00:00

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.

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,573 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jerryzy 10,566 Reputation points
    2021-03-31T02:08:27.757+00:00

    Hi @sp13test ,

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful