Get File from List Item using REST API

The following endpoints help to get the List Item from Document library based on if its id is 1 and then expands the properties of File.

http://<SharePointSite>/_api/web/lists/getbytitle('Documents')/getitembyid(1)?$select=File&$expand=File

or

http://<SharePointSite>/api/web/lists/getbytitle('Videos')/items?files?$filter=Id eq 1&$select=File$expand=File 

This endpoint returns the following properties of the file,

  • CheckInComment
  • CheckOutType
  • ContentTag
  • CustomizedPageStatus
  • ETag
  • Exists
  • IrmEnabled
  • Length
  • Level
  • LinkingUrl
  • MajorVersion
  • MinorVersion
  • Name
  • ServerRelativeUrl
  • TimeCreated
  • TimeLastModified
  • Title
  • UIVersion
  • UIVersionLabel
  • UniqueId
Ebook Download
View all
Learn
View all