Method: accessproposals.resolve
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Utilizzato per approvare o rifiutare una proposta di accesso.
Richiesta HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
fileId |
string
Obbligatorio. L'ID dell'articolo per cui viene effettuata la richiesta.
|
proposalId |
string
Obbligatorio. L'ID della proposta di accesso da risolvere.
|
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
Campi |
role[] |
string
Facoltativo. Eventuali ruoli consentiti dall'approvatore. Nota: questo campo è obbligatorio per l'azione ACCEPT .
|
view |
string
Facoltativo. Indica la visualizzazione per questa proposta di accesso. Questo valore deve essere impostato solo quando la proposta appartiene a una visualizzazione. published è l'unico valore supportato.
|
action |
enum (Action )
Obbligatorio. L'azione da eseguire su AccessProposal.
|
sendNotification |
boolean
Facoltativo. Indica se inviare un'email al richiedente quando AccessProposal viene rifiutato o accettato.
|
Corpo della risposta
In caso di esito positivo, il corpo della risposta è un oggetto JSON vuoto.
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
Alcuni ambiti sono limitati e richiedono una valutazione di sicurezza per poter essere utilizzati dalla tua app. Per ulteriori informazioni, consulta la Guida all'autorizzazione.
Azione
La modifica dello stato di AccessProposal.
Enum |
ACTION_UNSPECIFIED |
Azione non specificata |
ACCEPT |
L'utente accetta la proposta. Nota: se viene utilizzata questa azione, il campo role deve avere almeno un valore. |
DENY |
L'utente rifiuta la proposta |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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 |"]]