I believe there is no such endpoint to get the most recent documents from a specific Sharepoint library. Site usage and Recent documents web part could display the most recent documents accessed by the current user of the page.
- Site usage
By means of F12 tool, we can find the Request url :
https://abc.sharepoint.com/_api/v2.1/sites/abc.sharepoint.com,5ae427d1-c859-4c58-97c4-e20ad27b850b,352d1542-3d0a-4f99-a529-723e41552082/items?$filter=isof('oneDrive.Item') AND oneDrive.item/file ne null&$expand=analytics($expand=lastSevenDays)&$orderby=analytics/lastSevenDays/access/actorCount desc
However all the above cannot scope into a specific Sharepoint library, their target is the site.
Best Regards,
Baker Kong
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.