I have a document approval SharePoint Designer 2013 workflow. The workflow reacts on the creation of a new folder inside a document library. The newly created folder will contain new documents uploaded by users.
I found out that I can break/set permissions on the newly created folder using REST api:
/_api/web/lists/getByTitle('document library')/items('id of the new folder')/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)
My problem is: How can I break/set permissions on the documents uploaded inside the new folder, possibly via rest api?
I really cannot find I way to do it. I need to get one level down with respect to the folder to set permissions on single documents. Any help would be really appreciated.