0
votes

all.

I have a problem to get DriveItem by a path from OneDrive service.

The first request: GET me/drive/root/children

      "remoteItem": {
    "id": "EF8A24CC458790DF!106",
    "parentReference": {
      "driveId": "ef8a24cc458790df",
      "driveType": "personal"
    }
  }

The second request: drives/ef8a24cc458790df/items/EF8A24CC458790DF!106/children

{  "value": [
{
  "parentReference": {
    "driveId": "ef8a24cc458790df",
    "driveType": "personal",
    "id": "EF8A24CC458790DF!106",
    "name": "src",
    "path": "/drives/ef8a24cc458790df/root:/onedriveapi/src"
  },
} ] }

But request: /drives/ef8a24cc458790df/root:/onedriveapi/src failed with code "itemNotFound".

This has to work: https://github.com/OneDrive/onedrive-api-docs/blob/live/docs/rest-api/api/driveitem_get.md

Where is my mistake?

1
I have tried it. It works. Could you provide more information for your case. I suggest you should check your 'driveId' for your request - Keen Jin
@kikang, What information do you need? If I share to you my folder, can you give me the path to the file? - sploid
I don't need you to share the folder, because that's your information and it will violate the rules. What I need to confirm is whether you passed the correct 'DriveID' in your request. So I suggest that you provide details of these two requests without carrying personal information. - Keen Jin

1 Answers

0
votes

It is bug in API. For non-owner cases, a direct path from the root is not allowed. https://github.com/OneDrive/onedrive-api-docs/issues/908