I'm trying to provide a better process than the current process of checking files out when they are finalized to make them read-only. We have a status field called archive that once this is triggered I would run a workflow to do what needs to be done. I tried using a REST POST based on some sites I've seen and it does not seem to work. I get a badRequest as my response to the REST call.
My workflow updates the current items content-type to one of Archive and then I run my REST operation to break privileges. I have not gotten any further since breaking privileges is not working.
This is my REST POST call. I have full rights on this list.
[%Workflow Context:Current Site URL%]/_api/lists/getByTitle(‘[%Workflow Context:List Name%]')/items('[%Workflow Context:Current Item:ID%])/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)
I want to break inheritance of privileges and then assign any groups that were associated to this file to read-only with the exception of any owner groups