Users can use REST Services to call out a file or folder in the DM (Company, Shell, or Project), specify names of the users or groups at that location, and delete any (or all) of the existing permissions (users or groups) available in the UI for that file or folder.
You can remove users or groups from permissions through REST Services only if the Inherit permissions from the parent folder option is not selected. If this option is selected, then the remove of users or groups will not go through. You can change the inherit permissions condition (on a file or folder by) by deselecting the Inherit permissions from the parent folder through REST Services.