Method: accessproposals.resolve
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.
Dùng để phê duyệt hoặc từ chối Đề xuất cấp quyền truy cập.
Yêu cầu HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
fileId |
string
Bắt buộc. Mã của mặt hàng mà yêu cầu đang áp dụng.
|
proposalId |
string
Bắt buộc. Mã của đề xuất quyền truy cập cần giải quyết.
|
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:
Biểu diễn dưới dạng JSON |
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
Trường |
role[] |
string
Không bắt buộc. Các vai trò mà người phê duyệt đã cho phép (nếu có). Lưu ý: Đây là trường bắt buộc cho thao tác ACCEPT .
|
view |
string
Không bắt buộc. Cho biết chế độ xem cho đề xuất quyền truy cập này. Bạn chỉ nên đặt thuộc tính này khi đề xuất thuộc về một thành phần hiển thị. published là giá trị duy nhất được hỗ trợ.
|
action |
enum (Action )
Bắt buộc. Hành động cần thực hiện đối với AccessProposal.
|
sendNotification |
boolean
Không bắt buộc. Liệu có gửi email cho người yêu cầu khi AccessProposal bị từ chối hoặc được chấp nhận hay không.
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ là một đối tượng JSON trống.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
Một số phạm vi bị hạn chế và yêu cầu đánh giá bảo mật để ứng dụng của bạn có thể sử dụng. Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Hành động
Thay đổi trạng thái của AccessProposal.
Enum |
ACTION_UNSPECIFIED |
Thao tác không xác định |
ACCEPT |
Người dùng chấp nhận đề xuất. Lưu ý: Nếu bạn sử dụng hành động này, trường role phải có ít nhất một giá trị. |
DENY |
Người dùng từ chối đề xuất |
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: 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 |"]]