Method: notes.permissions.batchDelete
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
删除记事的一项或多项权限。指定的实体将立即失去访问权限。无法移除具有 OWNER
角色的权限。如果移除权限失败,则整个请求都会失败,并且不会进行任何更改。如果记事中不存在指定的权限,则返回 400 错误“Bad Request”。
HTTP 请求
POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchDelete
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
所有要删除的权限共享的父级资源。格式:notes/{note} 如果设置此字段,则 DeletePermissionRequest 消息中指定的所有权限的父级必须与此字段匹配。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"names": [
string
]
} |
字段 |
names[] |
string
必需。要删除的权限的名称。格式:notes/{note}/permissions/{permission}
|
响应正文
如果成功,则响应正文为空的 JSON 对象。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/keep
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: notes.permissions.batchDelete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nDeletes one or more permissions on the note. The specified entities will immediately lose access. A permission with the `OWNER` role can't be removed. If removing a permission fails, then the entire request fails and no changes are made. Returns a 400 bad request error if a specified permission does not exist on the note.\n\n### HTTP request\n\n`POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchDelete`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` The parent resource shared by all permissions being deleted. Format: `notes/{note}` If this is set, the parent of all of the permissions specified in the DeletePermissionRequest messages must match this field. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------|\n| ``` { \"names\": [ string ] } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------|\n| `names[]` | `string` Required. The names of the permissions to delete. Format: `notes/{note}/permissions/{permission}` |\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/keep`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]