Get driveItem without absolute path

Yucra López, Carlos Enrique 1 Reputation point

Hello everyone.
I'm trying to get an driveItem without telling all the path for example the call would be like : GET<id_site>/<idItem> and returning all data of the item requested.

Does exist any solution to my question?


Best regards.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,796 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 96,836 Reputation points MVP

    As long as you have the itemId, there is no need to specify the path. For example, this is how to get a specific item within my ODFB site collection:


    For SPO site collections it's a bit more complicated, as you need to provide the siteId and listId first, but items within the library can be enumerated by simple incremental numbers. Here's an example:


    where I'm getting the 55th item in the Shared Documents library of the default site collection.

    0 comments No comments