Few questions about sharepoint restful API for document library

  1. There is no single restful call to retrieve items of a specific view, right?

  2. Now I called /fields to get all fields that are FieldTypeKind==20 (User), then I call /ViewFields to construct the query with expanding, finally call /items to get items. Is it correct?

  3. calling /items can get all fields that I can saw on doclib web part, but there is no URL for files. Calling /files have no field I can use to match the items from /items, how to fix it?

Thanks From Peter

  • Thank you all, i think i had a big mistake about learning sharepoint restful api. I found out it is base on oData and oData should provide the ability to link up different resources, in my case, it should has a way to link up items and files, rather than we call every single APIs and combine the data ourselves. I will do some research on it. Thank you for you time. Dec 25, 2017 at 14:30
  • @PeterCheung Please don't forget to upvote the helpful answer and Mark the correct one from the below answers Thanks! Jan 15, 2018 at 8:24

2 Answers 2


The following are applicable to both list/library as appropriate

  1. NO RESTFull api available to get items view based.
  2. Yes, Always column which holder more or collection of metadata I can be accessed using $select and $expand https://webapplication.com/_api/web/lists/getbytitle('Issues')/items?$filter=ID eq 1&$select=Title,Editor/Title&$expand=Editor/Title

Check here for MSDN documentation.

  1. $select and $expand would work for document libraries as well. However, there is a slight difference while calling API for doc libs like below



Refer here for more info.

  • i found something crazy: /items/$filter=GUID eq (guid'efee39c7-ae90-434a-9174-9a9bd7411c74') which works great, but fail to filter the uniqueId /items/$filter=UniqueId eq (guid’asdas9c7-1290-4123-9174-9a9bd7411c74') will return empty json. Althought i can't filter the uniqueId, but i can select it Dec 25, 2017 at 8:07
  • What is the datatype of GUID column? If it is a string compare like string without typecasting. Dec 25, 2017 at 9:12

1.We can get list item of a list view using REST API + CAML Query.


Check the article below:


2.To get user field from list items, we can use like this:


More information: https://social.technet.microsoft.com/wiki/contents/articles/31210.sharepoint-2013-get-user-details-from-person-or-group-field-using-rest-api.aspx

3.To get files url, we can use this:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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