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 grant any (or all) of the existing permissions (users or groups) available in the UI for that file or folder.
Users can grant permissions to a file or folder in REST Services by stating that a file or folder "Inherit permissions from the parent folder."
If a user states that a file or folder "Inherit permissions from the parent folder" and also calls user or group names and grants permissions to those individually, then the "Inherit permissions from the parent folder" setting will take precedence and the manually called out permissions will be ignored.
Users can call out a folder and grant permissions to files or folders located within the folder by stating in the REST Services: "Apply these permissions to documents and sub-folders."