Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  


Query SharePoint Document by Custom Field using API
Use the REST api by starting with getbytitle based on the root folder of your search:


Append 'filter' to filter search by your custom field: (e.g MYCUSTOMFIELD = abc):

Append 'select' to select your custom field and the file name (FileRef):


You can also add ServerUrl or other properties as needed.

Then use the SharePoint REST API in .NET to load your items:
var api = new {namespace}.MS.FileServices.ApiData(apiUrl);
api.Credentials = CredentialCache.DefaultCredentials;
var uItems = new Uri(restUrl);
var spItems = api.Execute<{namespace}.SP.Data.{LibraryItemTypeReturned}>(uItems).ToList();

Created By: amos 11/27/2017 12:41:14 PM
Updated: 11/27/2017 5:03:05 PM