How to get the list of possible operations that ca

2019-09-02 15:45发布

问题:

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?