Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

C#/REST Getting files in a document library using Internal Name

$
0
0

Hi Folks,

I need to get a list of files in a SP2010 and SP2013 document library using the REST API - this is occurring inside a timer service application so am using C#.  As a constraint I need to use the internal names for the document libraries - primarily because users tend to change the display name and this is an automated service.

  • When I make a call to _api/web/GetFolderByServerRealitveUrl('/Shared Documents')/Files  I get a bunch of XML but how do I get just a list of filename+ext.   I am using Xdocument (LINQ to XML). I need to retrieve the name property in the contents sub element for all files returned.

  • Second question, how to I change this to use the internal name '/Document' instead of '/Shared Document', so that it copes with users changing the display name of document libraries.

Regards

Andy


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>