Method: accessproposals.resolve
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تُستخدَم للموافقة على اقتراح الوصول أو رفضه.
طلب HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
fileId |
string
مطلوب. معرّف العنصر الذي يسري عليه الطلب
|
proposalId |
string
مطلوب. معرّف اقتراح الوصول المطلوب حلّه
|
نص الطلب
يحتوي نص الطلب على بيانات بالبنية التالية:
تمثيل 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
تكون بعض النطاقات محظورة وتتطلّب تقييم أمان ليتمكّن تطبيقك من استخدامها. لمزيد من المعلومات، يمكنك الاطّلاع على دليل التفويض.
الإجراء
تغيير حالة AccessProposal
عمليات التعداد |
ACTION_UNSPECIFIED |
إجراء غير محدّد |
ACCEPT |
يقبل المستخدم الاقتراح. ملاحظة: في حال استخدام هذا الإجراء، يجب أن يحتوي الحقل role على قيمة واحدة على الأقل. |
DENY |
رفض المستخدم الاقتراح |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة 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 |"]]