Method: accessproposals.resolve
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
网址采用 gRPC 转码语法。
路径参数
参数 |
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 字段必须包含至少一个值。 |
DENY |
用户拒绝提案 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],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 |"]]