How to get the list of possible operations that can be performed on DriveItem resource?

南楼画角 提交于 2019-12-11 15:47:32

问题


We are writing a OneDrive client application using a the REST APIs provided for OneDrive (personal) and need a way to identify the operations supported/allowed on the resource.

There's something called activities which lists all the operations that have already been performed on a resource.

And the Permission resource provides information about a sharing permission granted for a DriveItem resource.

The same is returning a blank array when called:(.

So, is there any way to identify what all operations that are allowed on a resource at hand, like Google Drive v3 File resource has a field called 'capabilities' which lists all the operations that are allowed on a resource making it easy for the clients to display only supported actions when that particular resource is selected in client application.


回答1:


Actually the permissions resource gives shared information that had been granted on a particular resource, i.e. this information is available only if the resource is shared with other users.

So for all the files in 'Shared by me' section of One Drive Personal this information will be available and using the same user can manage sharing access to the resource.

But still the question remains that how to identify what all actions are allowed on particular resource or a role user have on a resource?



来源:https://stackoverflow.com/questions/50905921/how-to-get-the-list-of-possible-operations-that-can-be-performed-on-driveitem-re

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!