Method: notes.permissions.batchCreate
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
メモに 1 つ以上の権限を作成します。作成できるのは、WRITER
ロールの権限のみです。権限の追加に失敗した場合、リクエスト全体が失敗し、変更は行われません。
HTTP リクエスト
POST https://keep.googleapis.com/v1/{parent=notes/*}/permissions:batchCreate
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
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. |"]]