Method: notes.permissions.batchCreate
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một hoặc nhiều quyền trên ghi chú. Bạn chỉ có thể tạo các quyền có vai trò WRITER
. Nếu không thêm được quyền nào, thì toàn bộ yêu cầu sẽ không thành công và không có thay đổi nào được thực hiện.
Yêu cầu HTTP
POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchCreate
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
parent |
string
Tài nguyên mẹ được chia sẻ bởi tất cả các Quyền đang được tạo. Định dạng: notes/{note} Nếu bạn đặt trường này, thì trường mẹ trong thông báo CreatePermission phải để trống hoặc khớp với trường này.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Trường |
requests[] |
object (CreatePermissionRequest )
Thông báo yêu cầu chỉ định các tài nguyên cần tạo.
|
Nội dung phản hồi
Phản hồi cho việc tạo quyền trên một ghi chú.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"permissions": [
{
object (Permission )
}
]
} |
Trường |
permissions[] |
object (Permission )
Đã tạo quyền.
|
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/keep
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
CreatePermissionRequest
Yêu cầu thêm một quyền trên ghi chú.
Biểu diễn dưới dạng JSON |
{
"parent": string,
"permission": {
object (Permission )
}
} |
Trường |
parent |
string
Bắt buộc. Ghi chú mẹ nơi tạo quyền này. Định dạng notes/{note}
|
permission |
object (Permission )
Bắt buộc. Quyền tạo. Bạn phải cung cấp một trong các thuộc tính Permission.email, User.email hoặc Group.email.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: notes.permissions.batchCreate\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 - [JSON representation](#body.BatchCreatePermissionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [CreatePermissionRequest](#CreatePermissionRequest)\n - [JSON representation](#CreatePermissionRequest.SCHEMA_REPRESENTATION)\n\nCreates one or more permissions on the note. Only permissions with the `WRITER` role may be created. If adding any permission fails, then the entire request fails and no changes are made.\n\n### HTTP request\n\n`POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchCreate`\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 created. Format: `notes/{note}` If this is set, the parent field in the CreatePermission messages must either be empty or match this field. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (/workspace/keep/api/reference/rest/v1/notes.permissions/batchCreate#CreatePermissionRequest) } ] } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[CreatePermissionRequest](/workspace/keep/api/reference/rest/v1/notes.permissions/batchCreate#CreatePermissionRequest)`)` The request message specifying the resources to create. |\n\n### Response body\n\nThe response for creating permissions on a note.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------|\n| ``` { \"permissions\": [ { object (/workspace/keep/api/reference/rest/v1/notes#Permission) } ] } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------|\n| `permissions[]` | `object (`[Permission](/workspace/keep/api/reference/rest/v1/notes#Permission)`)` Permissions created. |\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).\n\nCreatePermissionRequest\n-----------------------\n\nThe request to add a single permission on the note.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------|\n| ``` { \"parent\": string, \"permission\": { object (/workspace/keep/api/reference/rest/v1/notes#Permission) } } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent note where this permission will be created. Format: `notes/{note}` |\n| `permission` | `object (`[Permission](/workspace/keep/api/reference/rest/v1/notes#Permission)`)` Required. The permission to create. One of Permission.email, User.email or Group.email must be supplied. |"]]