我在 SharePoint 中有一个包含 5000 多个项目的列表。我想批量打破项目与其父站点的权限继承。我尝试按照此指令来打破单个项目的权限继承。当我尝试通过 $batch 实现相同的操作
getByTitle('*My_List*')/items(261)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)
时,它不起作用,但也没有报告错误。
这是我遵循的 $batch 说明。下面的代码是我的 API 调用:
模板1:
--changeset_be8f3abd-b17e-499a-ade8-3e2443be74f3
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH https://my_site/_api/web/lists/getByTitle('My_list')/items(|ID|)/BreakRoleInheritance(copyRoleAssignments=false,clearSubscopes=true) HTTP/1.1
Content-Type: application/json;odata=verbose
Accept: application/json;odata=nometadata
IF-MATCH: *
有人可以帮忙检查我的列表的 REST API 调用有什么问题吗?我通过 $batch REST API 成功实现了批量获取、删除和创建列表项,但 BreakRole 继承不起作用。
我知道问题出在哪里。一旦我添加了一个要操作的项目并且它正在工作,我只尝试了一条记录。