I have looked around for this question and either couldn't find the answer or mis-understood it. Here is what I am looking for: All I have is a DocID from Sharepoint and I need to do a search on the site to look for the document so I can pull back some meta-data from the file. I am using the REST API to do the searches, but everything I have found points to a Collection or folder to search in. The docID is stored in a local database after the document has been updated to SharePoint, the user will be searching the local database for documents. What we are looking for is to query SharePoint with the DocId to get some additional data including the download link.

Is there a way to do a site search for a document with only the DocID without knowing the library, collection, list, etc. that contains it?

  • Did you ever find a solution? I have the same problem.
    – Steve
    Jul 29, 2018 at 1:41
  • Here is what I ended up doing since there is no direct way of doing this through the REST API. I do a lookup of the file using the _api/web/lists/getbyTitle<path>/getbyId<id>/?$expand=file method. Then I take the file name and path from the results and pass those into an _api/search/querystring? using the file name and path to directly search the location to pull out the Managed Properties from the search. It's two calls, but I couldn't find any other way to do this. Seems to me like this would be a common request.
    – john
    Jul 30, 2018 at 15:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.