Method: accessproposals.resolve
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Digunakan untuk menyetujui atau menolak Proposal Akses.
Permintaan HTTP
POST https://www.googleapis.com/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
fileId |
string
Wajib. ID item tempat permintaan berada.
|
proposalId |
string
Wajib. ID proposal akses yang akan diselesaikan.
|
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
Representasi JSON |
{
"role": [
string
],
"view": string,
"action": enum (Action ),
"sendNotification": boolean
} |
Kolom |
role[] |
string
Opsional. Peran yang diizinkan oleh pemberi persetujuan, jika ada. Catatan: Kolom ini wajib diisi untuk tindakan ACCEPT .
|
view |
string
Opsional. Menunjukkan tampilan untuk proposal akses ini. Kolom ini hanya boleh ditetapkan jika proposal termasuk dalam tampilan. published adalah satu-satunya nilai yang didukung.
|
action |
enum (Action )
Wajib. Tindakan yang akan diambil pada AccessProposal.
|
sendNotification |
boolean
Opsional. Apakah akan mengirim email kepada pemohon saat AccessProposal ditolak atau diterima.
|
Isi respons
Jika berhasil, isi respons adalah objek JSON kosong.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
Beberapa cakupan dibatasi dan memerlukan penilaian keamanan agar aplikasi Anda dapat menggunakannya. Untuk informasi selengkapnya, lihat Panduan otorisasi.
Tindakan
Perubahan status AccessProposal.
Enum |
ACTION_UNSPECIFIED |
Tindakan tidak ditentukan |
ACCEPT |
Pengguna menyetujui proposal. Catatan: Jika tindakan ini digunakan, kolom role harus memiliki minimal satu nilai. |
DENY |
Pengguna menolak proposal |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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 |"]]