Just getting into REST and have used the web access point to read information from a list. For example https://{site url}/_api/web/Lists/GetByTitle('ListName')/items?$filter=OData__dlc_DocId eq 'ENP573UWAVVE-7-15'&$select=Title,FileRef

Now I'm trying to do the same thing but using the search end point. I haven't found very many tutorials or blog posts on using search, but did findthis documentation

I'm trying to recreate the read request with

https://{site url}/_api/search/query....

But not sure what to put at the end of the url.

Not sure which name for the properties to use. I assume the managed property names so OData__dlc_DocId becomes dlcDocIdOWSText. I don't think FileRef is a crawled property, but ows_ParentURL will do.

So how do I say, "query for dlcDocIDOWSText equal to a value and return only the Title, Doc Id, and ParentLink"?

I've tried appending ?querytext="dlcDocIDOWSText:ENP573UWAVVE-7-15" but anything that includes querytext generates a 'querytext is missing or invalid error. I've tried variations with and without quotes and with = instead of :

I've tried ?dlcDocIdOWSTEXT=ENP573UWAVVE-7-15 which returns results, but the Row count is 10, so I don't think I'm getting the one thing only.

After that I'm still completely confused about how to say only return specific properties for the result.

Any help or guidance would be greatly appreciated.

  • try using the call like this, you should be able get something: yourdomain.sharepoint.com/_api/search/…' – Shawn Feb 9 '16 at 22:55
  • Thanks that helped I figured out that " and ' aren't the same. double quotes cause the missing/invalid error. – Rothrock Feb 9 '16 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.