Method: accessproposals.resolve
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
アクセス提案を承認または拒否するために使用します。
HTTP リクエスト
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
fileId |
string
必須。リクエストが適用されているアイテムの ID。
|
proposalId |
string
必須。解決するアクセス提案の ID。
|
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
フィールド |
role[] |
string
省略可。承認者が許可したロール(ある場合)。注: このフィールドは ACCEPT アクションで必須です。
|
view |
string
省略可。このアクセス プロポーザルのビューを示します。これは、プロポーザルがビューに属している場合にのみ設定する必要があります。サポートされる値は published のみです。
|
action |
enum (Action )
必須。AccessProposal に対して行うアクション。
|
sendNotification |
boolean
省略可。AccessProposal が拒否または承認されたときに、リクエスト元にメールを送信するかどうか。
|
レスポンスの本文
成功した場合、レスポンスの本文は空の JSON オブジェクトになります。
認可スコープ
以下のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
一部のスコープは制限されており、アプリで使用するにはセキュリティ評価が必要です。詳しくは、認可ガイドをご覧ください。
アクション
列挙型 |
ACTION_UNSPECIFIED |
アクションの指定なし |
ACCEPT |
ユーザーがプロポーザルを承認します。注: このアクションを使用する場合は、role フィールドに少なくとも 1 つの値を指定する必要があります。 |
DENY |
ユーザーが提案を拒否した場合 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: accessproposals.resolve\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- [Action](#Action)\n- [Try it!](#try-it)\n\nUsed to approve or deny an Access Proposal.\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|--------------------------------------------------------------|\n| `fileId` | `string` Required. The id of the item the request is on. |\n| `proposalId` | `string` Required. The id of the access proposal to resolve. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"role\": [ string ], \"view\": string, \"action\": enum (/workspace/drive/api/reference/rest/v3/accessproposals/resolve#Action), \"sendNotification\": boolean } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `role[]` | `string` Optional. The roles the approver has allowed, if any. Note: This field is required for the `ACCEPT` action. |\n| `view` | `string` Optional. Indicates the view for this access proposal. This should only be set when the proposal belongs to a view. `published` is the only supported value. |\n| `action` | `enum (`[Action](/workspace/drive/api/reference/rest/v3/accessproposals/resolve#Action)`)` Required. The action to take on the AccessProposal. |\n| `sendNotification` | `boolean` Optional. Whether to send an email to the requester when the AccessProposal is denied or accepted. |\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/docs`\n- `\n https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nAction\n------\n\nThe state change of the AccessProposal.\n\n| Enums ||\n|----------------------|-------------------------------------------------------------------------------------------------------------|\n| `ACTION_UNSPECIFIED` | Unspecified action |\n| `ACCEPT` | The user accepts the proposal. Note: If this action is used, the `role` field must have at least one value. |\n| `DENY` | The user denies the proposal |"]]