How to get all the items contained inside a office365 onedrive

后端 未结 2 2016
無奈伤痛
無奈伤痛 2021-01-14 09:21

I want to get all the files and folders contained inside a office365 onedrive folder in one rest API call, is there any option to do it?

2条回答
  •  庸人自扰
    2021-01-14 09:26

    There isn't a specific API call to retrieve a flat representation of a Drive. You can achieve a similar effect however using the drive's search method.

    Simply pass an empty query string and it will return metadata for each file (regardless of it's directory):

    https://graph.microsoft.com/v1.0/me/drive/root/search(q='')

提交回复
热议问题