In site collection features there is an option to enable Document ID Service. After doing this, whenever a document is uploaded to a document library, a unique document id that is a link to the doc is provided as a column. I would like to use the SharePoint API to retrieve this document only by this id.
Doing an API call like this works to some extent (using the internal name of the document ID column):
<url_SP_Site>/_api/web/lists/getbytitle('[Name_Document_Library]')/items?$select=Id&$filter=OData__dlc_DocId eq '[Id_you_search_for]'
In this type of format, the call only works if the document is in a document library with a specific name (if user has the file in a library name 'New Lib' it won't work).
Is there a way to get a document by its Id from ANY library in SharePoint?
In that way the document does not have to be uploaded into a library with a specific name. Additionally, the above API call does not return any of the column information from the document, it only returns the ID.
Can anyone modify the call so that the return includes ALL of the column information?
Any help would be greatly appreciated!