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

API items endpoint filter for field

$
0
0

We are trying to use the API in order to look @ the <d:Url> element below and search for anything in this particular library that starts with http://.  This is the link you get when using the Document ID or "..." from the item in the library.  All files in this library should start with https://, so we're trying to discover those beginning with http://.  Both http and https are still supported, but we're migrating to an https: environment.

<d:Title>MyPowerPoint.ppt</d:Title> 
- <d:OData__dlc_DocIdUrl m:type="SP.FieldUrlValue">
  <d:Description>AAABBBCCC-355105229-2747</d:Description> 
  <d:Url>http://mysite.com/sites/ABC006/_layouts/15/DocIdRedir.aspx?ID=AAABBBCCC-355105229-2747</d:Url> 
  </d:OData__dlc_DocIdUrl>
  <d:Name m:null="true" /> 
  </m:properties>
  </content>

The following endpoints give me a 500 error (I've tried using _dlc_DocIdUrl and OData__dlc_DocIdUrl)

http://mysite.com/sites/ABC006/_api/web/lists/getbytitle('TECHLib')/items?$select=Title,Name,OData__dlc_DocIdUrl&$top=5000&$filter=startswith(_dlc_DocIdUrl,'http://')

http://mysite.com/sites/ABC006/_api/web/lists/getbytitle('TECHNlib')/items?$select=Title,Name,OData__dlc_DocIdUrl&$top=5000&$filter=substringof('http:',OData__dlc_DocIdUrl)


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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