Method: notes.permissions.batchCreate
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างสิทธิ์อย่างน้อย 1 รายการในโน้ต คุณจะสร้างได้เฉพาะสิทธิ์ที่มีบทบาท WRITER
หากเพิ่มสิทธิ์ไม่สำเร็จ คำขอทั้งหมดจะไม่สำเร็จและจะไม่มีการเปลี่ยนแปลงใดๆ
คำขอ HTTP
POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchCreate
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ทรัพยากรหลักที่สิทธิ์ทั้งหมดที่สร้างขึ้นแชร์ รูปแบบ: notes/{note} หากตั้งค่านี้ไว้ ช่องหลักในข้อความ CreatePermission ต้องว่างเปล่าหรือตรงกับช่องนี้
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
requests[] |
object (CreatePermissionRequest )
ข้อความคําขอที่ระบุทรัพยากรที่จะสร้าง
|
เนื้อหาการตอบกลับ
การตอบกลับสำหรับการสร้างสิทธิ์ในโน้ต
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"permissions": [
{
object (Permission )
}
]
} |
ช่อง |
permissions[] |
object (Permission )
สร้างสิทธิ์แล้ว
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/keep
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
CreatePermissionRequest
คำขอเพิ่มสิทธิ์เดียวในโน้ต
การแสดง JSON |
{
"parent": string,
"permission": {
object (Permission )
}
} |
ช่อง |
parent |
string
ต้องระบุ หมายเหตุหลักที่จะสร้างสิทธิ์นี้ รูปแบบ: notes/{note}
|
permission |
object (Permission )
ต้องระบุ สิทธิ์ในการสร้าง คุณต้องระบุค่าใดค่าหนึ่งต่อไปนี้ Permission.email, User.email หรือ Group.email
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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. |"]]