Google Drive API 可讓用戶端存取 Google 雲端硬碟中的資源,
- REST 資源:v3.about
- REST 資源:v3.changes
- REST 資源:v3.channels
- REST 資源:v3.comments
- REST 資源:v3.drives
- REST 資源:v3.files
- REST 資源:v3.permissions
- REST 資源:v3.replies
- REST 資源:v3.revisions
服務:googleapis.com/drive/v3
如要呼叫這項服務,建議您使用 Google 提供的用戶端程式庫。如果應用程式必須使用您自己的程式庫來呼叫這項服務,請在發出 API 要求時提供下列資訊。
探索文件
探索文件是一種機器可解讀的規格,用於說明和使用 REST API。此文件用於建構用戶端程式庫、IDE 外掛程式,以及與 Google API 互動的其他工具。一項服務可能會提供多個探索文件。這項服務提供下列探索文件:
服務端點
服務端點是指定 API 服務網路位址的基準網址。一項服務可能有多個服務端點。這項服務有以下服務端點,且下方的 URI 皆以此服務端點為基準:
https://www.googleapis.com
REST 資源:v3.about
方法 | |
---|---|
get |
GET /drive/v3/about 取得使用者、雲端硬碟和系統功能的相關資訊。 |
REST 資源:v3.changes
方法 | |
---|---|
getStartPageToken |
GET /drive/v3/changes/startPageToken 取得起始 pageToken,以便列出日後的變更。 |
list |
GET /drive/v3/changes 列出使用者或共用雲端硬碟的變更。 |
watch |
POST /drive/v3/changes/watch 訂閱使用者的變更。 |
REST 資源:v3.channels
方法 | |
---|---|
stop |
POST /drive/v3/channels/stop 停止透過這個頻道觀看資源。 |
REST 資源:v3.comments
方法 | |
---|---|
create |
POST /drive/v3/files/{fileId}/comments 為檔案建立註解。 |
delete |
DELETE /drive/v3/files/{fileId}/comments/{commentId} 刪除留言。 |
get |
GET /drive/v3/files/{fileId}/comments/{commentId} 根據 ID 取得留言。 |
list |
GET /drive/v3/files/{fileId}/comments 列出檔案註解。 |
update |
PATCH /drive/v3/files/{fileId}/comments/{commentId} 使用修補語意更新註解。 |
REST 資源:v3.drives
方法 | |
---|---|
create |
POST /drive/v3/drives 建立共用雲端硬碟。 |
delete |
DELETE /drive/v3/drives/{driveId} 永久刪除使用者為 organizer 的共用雲端硬碟。 |
get |
GET /drive/v3/drives/{driveId} 根據 ID 取得共用雲端硬碟的中繼資料。 |
hide |
POST /drive/v3/drives/{driveId}/hide 在預設檢視畫面中隱藏共用雲端硬碟。 |
list |
GET /drive/v3/drives 列出使用者的共用雲端硬碟。 |
unhide |
POST /drive/v3/drives/{driveId}/unhide 將共用雲端硬碟還原為預設檢視畫面。 |
update |
PATCH /drive/v3/drives/{driveId} 更新共用雲端硬碟的中繼日期。 |
REST 資源:v3.files
方法 | |
---|---|
copy |
POST /drive/v3/files/{fileId}/copy 建立檔案副本,並透過修補語意套用所有必要的更新。 |
create |
POST /drive/v3/files POST /upload/drive/v3/files 建立新檔案。 |
delete |
DELETE /drive/v3/files/{fileId} 永久刪除使用者擁有的檔案,但不將檔案移至垃圾桶。 |
emptyTrash |
DELETE /drive/v3/files/trash 永久刪除使用者垃圾桶中的所有檔案。 |
export |
GET /drive/v3/files/{fileId}/export 將 Google Workspace 文件匯出至要求的 MIME 類型,並傳回匯出的位元組內容。 |
generateIds |
GET /drive/v3/files/generateIds 產生一組檔案 ID,可在建立或複製要求時提供。 |
get |
GET /drive/v3/files/{fileId} 依 ID 取得檔案中繼資料或內容。 |
list |
GET /drive/v3/files 列出使用者的檔案。 |
listLabels |
GET /drive/v3/files/{fileId}/listLabels 列出檔案上的標籤。 |
modifyLabels |
POST /drive/v3/files/{fileId}/modifyLabels 修改已套用至檔案的標籤組合。 |
update |
PATCH /drive/v3/files/{fileId} PATCH /upload/drive/v3/files/{fileId} 更新檔案的中繼資料和/或內容。 |
watch |
POST /drive/v3/files/{fileId}/watch 訂閱檔案變更。 |
REST 資源:v3.permissions
方法 | |
---|---|
create |
POST /drive/v3/files/{fileId}/permissions 建立檔案或共用雲端硬碟的權限。 |
delete |
DELETE /drive/v3/files/{fileId}/permissions/{permissionId} 刪除權限。 |
get |
GET /drive/v3/files/{fileId}/permissions/{permissionId} 依據 ID 取得權限。 |
list |
GET /drive/v3/files/{fileId}/permissions 列出檔案或共用雲端硬碟的權限。 |
update |
PATCH /drive/v3/files/{fileId}/permissions/{permissionId} 使用修補語意更新權限。 |
REST 資源:v3.replies
方法 | |
---|---|
create |
POST /drive/v3/files/{fileId}/comments/{commentId}/replies 回覆留言。 |
delete |
DELETE /drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId} 刪除回覆。 |
get |
GET /drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId} 依據 ID 取得回覆。 |
list |
GET /drive/v3/files/{fileId}/comments/{commentId}/replies 列出留言的回覆。 |
update |
PATCH /drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId} 使用修補語意更新回覆。 |
REST 資源:v3.revisions
方法 | |
---|---|
delete |
DELETE /drive/v3/files/{fileId}/revisions/{revisionId} 永久刪除檔案版本。 |
get |
GET /drive/v3/files/{fileId}/revisions/{revisionId} 依據 ID 取得修訂版本中繼資料或內容。 |
list |
GET /drive/v3/files/{fileId}/revisions 列出檔案的修訂版本。 |
update |
PATCH /drive/v3/files/{fileId}/revisions/{revisionId} 使用修補語意更新修訂版本。 |