Method: accessproposals.resolve
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משמש לאישור או לדחייה של הצעת גישה.
בקשת HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
כתובת ה-URL משתמשת בתחביר של Transcoding של 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
אופציונלי. האם לשלוח אימייל למבקש כשהצעת הגישה נדחית או מאושרת.
|
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה הוא אובייקט JSON ריק.
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
היקפי הרשאה מסוימים מוגבלים, ונדרש הערכת אבטחה כדי שהאפליקציה שלכם תוכל להשתמש בהם. מידע נוסף זמין במדריך ההרשאות.
פעולה
שינוי המצב של AccessProposal.
טיפוסים בני מנייה (enum) |
ACTION_UNSPECIFIED |
פעולה לא צוינה |
ACCEPT |
המשתמש מאשר את ההצעה. הערה: אם משתמשים בפעולה הזו, השדה role חייב לכלול לפחות ערך אחד. |
DENY |
המשתמש דוחה את ההצעה |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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 |"]]