Method: accessproposals.resolve
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برای تأیید یا رد یک پیشنهاد دسترسی استفاده می شود.
درخواست HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
fileId | string مورد نیاز. شناسه موردی که درخواست روی آن است. |
proposalId | string مورد نیاز. شناسه پیشنهاد دسترسی برای حل کردن. |
درخواست بدن
بدنه درخواست حاوی داده هایی با ساختار زیر است:
نمایندگی JSON |
---|
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
فیلدها |
---|
role[] | string اختیاری. نقش هایی که تایید کننده اجازه داده است، در صورت وجود. توجه: این فیلد برای اقدام ACCEPT ضروری است. |
view | string اختیاری. نمای این پیشنهاد دسترسی را نشان می دهد. این فقط زمانی باید تنظیم شود که پروپوزال متعلق به یک view باشد. 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
برخی از دامنه ها محدود هستند و برای استفاده از برنامه شما به ارزیابی امنیتی نیاز دارند. برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
اقدام
تغییر حالت AccessProposal.
Enums |
---|
ACTION_UNSPECIFIED | اقدام نامشخص |
ACCEPT | کاربر پیشنهاد را می پذیرد. توجه: در صورت استفاده از این عمل، فیلد role باید حداقل یک مقدار داشته باشد. |
DENY | کاربر پیشنهاد را رد می کند |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 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 |"]]