Method: accessproposals.resolve
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wird verwendet, um ein Zugriffsvorschlag zu genehmigen oder abzulehnen.
HTTP-Anfrage
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
fileId |
string
Erforderlich. Die ID des Artikels, für den die Anfrage erfolgt.
|
proposalId |
string
Erforderlich. Die ID des Zugriffsvorschlags, der gelöst werden soll.
|
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung |
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
Felder |
role[] |
string
Optional. Die Rollen, die der Genehmiger zugelassen hat, falls zutreffend. Hinweis: Dieses Feld ist für die Aktion ACCEPT erforderlich.
|
view |
string
Optional. Gibt die Ansicht für diesen Zugriffsvorschlag an. Diese Option sollte nur festgelegt werden, wenn der Vorschlag zu einer Ansicht gehört. published ist der einzige unterstützte Wert.
|
action |
enum (Action )
Erforderlich. Die Aktion, die für den Zugriffsvorschlag ausgeführt werden soll.
|
sendNotification |
boolean
Optional. Gibt an, ob der Antragsteller per E-Mail benachrichtigt werden soll, wenn der Zugriffsvorschlag abgelehnt oder akzeptiert wird.
|
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, ist der Antworttext ein leeres JSON-Objekt.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
Einige Bereiche sind eingeschränkt und erfordern eine Sicherheitsprüfung, damit Ihre App sie verwenden kann. Weitere Informationen finden Sie im Leitfaden zur Autorisierung.
Aktion
Die Statusänderung des AccessProposal.
Enums |
ACTION_UNSPECIFIED |
Nicht angegebene Aktion |
ACCEPT |
Der Nutzer nimmt das Angebot an. Hinweis: Wenn diese Aktion verwendet wird, muss das Feld role mindestens einen Wert haben. |
DENY |
Der Nutzer lehnt das Angebot ab |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 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 |"]]