Google 雲端硬碟 API 可讓用戶端存取 Google 雲端硬碟中的資源。
- REST 資源:v2.about
 - REST 資源:v2.apps
 - REST 資源:v2.changes
 - REST 資源:v2.channels
 - REST 資源:v2.children
 - REST 資源:v2.comments
 - REST 資源:v2.drives
 - REST 資源:v2.files
 - REST 資源:v2.parents
 - REST 資源:v2.permissions
 - REST 資源:v2.properties
 - REST 資源:v2.replies
 - REST 資源:v2.revisions
 
服務:googleapis.com/drive/v2
如要呼叫這項服務,建議您使用 Google 提供的用戶端程式庫。如果您的應用程式需要使用您自己的程式庫來呼叫這項服務,請在發出 API 要求時使用下列資訊。
探索文件
探索文件是一種機器可解讀的規格,用於說明和使用 REST API。此文件用於建構用戶端程式庫、IDE 外掛程式,以及與 Google API 互動的其他工具。一項服務可能會提供多個探索文件。這項服務提供下列探索文件:
服務端點
服務端點是指定 API 服務網路位址的基準網址。一項服務可能有多個服務端點。這項服務有以下服務端點,且下方的 URI 皆以此服務端點為基準:
https://www.googleapis.com
REST 資源:v2.about
| 方法 | |
|---|---|
                  get | 
                
                  GET /drive/v2/about 取得目前使用者資訊以及 Drive API 設定  | 
              
REST 資源:v2.apps
| 方法 | |
|---|---|
                  get | 
                
                  GET /drive/v2/apps/{appId} 取得特定應用程式。  | 
              
                  list | 
                
                  GET /drive/v2/apps 列出使用者已安裝的應用程式。  | 
              
REST 資源:v2.changes
| 方法 | |
|---|---|
                  get | 
                
                  GET /drive/v2/changes/{changeId} 已淘汰:請使用 changes.getStartPageToken 和 changes.list 擷取最近的變更。 | 
              
                  getStartPageToken | 
                
                  GET /drive/v2/changes/startPageToken 取得起始 pageToken,以列出日後的變更。  | 
              
                  list | 
                
                  GET /drive/v2/changes 列出使用者或共用雲端硬碟的變更。  | 
              
                  watch | 
                
                  POST /drive/v2/changes/watch 訂閱使用者的變更。  | 
              
REST 資源:v2.channels
| 方法 | |
|---|---|
                  stop | 
                
                  POST /drive/v2/channels/stop 停止透過這個管道觀看資源。  | 
              
REST 資源:v2.children
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{folderId}/children/{childId} 從資料夾移除孩子。  | 
              
                  get | 
                
                  GET /drive/v2/files/{folderId}/children/{childId} 取得特定子項參照。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{folderId}/children 將檔案插入資料夾。  | 
              
                  list | 
                
                  GET /drive/v2/files/{folderId}/children 列出資料夾的子項。  | 
              
REST 資源:v2.comments
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/comments/{commentId} 刪除留言。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/comments/{commentId} 依 ID 取得留言。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{fileId}/comments 在指定檔案上建立新註解。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/comments 列出檔案的註解。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId}/comments/{commentId} 更新現有註解。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId}/comments/{commentId} 更新現有註解。  | 
              
REST 資源:v2.drives
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/drives/{driveId} 永久刪除使用者為 organizer的共用雲端硬碟。 | 
              
                  get | 
                
                  GET /drive/v2/drives/{driveId} 取得共用雲端硬碟的 ID 中繼資料。  | 
              
                  hide | 
                
                  POST /drive/v2/drives/{driveId}/hide 隱藏共用雲端硬碟,不會顯示在預設檢視畫面中。  | 
              
                  insert | 
                
                  POST /drive/v2/drives 建立新的共用雲端硬碟。  | 
              
                  list | 
                
                  GET /drive/v2/drives 列出使用者的共用雲端硬碟。  | 
              
                  unhide | 
                
                  POST /drive/v2/drives/{driveId}/unhide 將共用雲端硬碟還原為預設檢視畫面。  | 
              
                  update | 
                
                  PUT /drive/v2/drives/{driveId} 更新共用雲端硬碟的中繼資料。  | 
              
REST 資源:v2.files
| 方法 | |
|---|---|
                  copy | 
                
                  POST /drive/v2/files/{fileId}/copy 建立指定檔案的副本。  | 
              
                  delete | 
                
                  DELETE /drive/v2/files/{fileId} 永久刪除使用者擁有的檔案,且不將檔案移至垃圾桶。  | 
              
                  emptyTrash | 
                
                  DELETE /drive/v2/files/trash 永久刪除使用者所有已刪除的檔案。  | 
              
                  export | 
                
                  GET /drive/v2/files/{fileId}/export 將 Google Workspace 文件匯出至要求的 MIME 類型,並傳回匯出的位元組內容。  | 
              
                  generateIds | 
                
                  GET /drive/v2/files/generateIds 產生可在插入或複製要求中提供的一組檔案 ID。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId} 根據 ID 取得檔案的中繼資料或內容。  | 
              
                  insert | 
                
                  POST /drive/v2/files POST /upload/drive/v2/files 插入新檔案。  | 
              
                  list | 
                
                  GET /drive/v2/files 列出使用者的檔案。  | 
              
                  listLabels | 
                
                  GET /drive/v2/files/{fileId}/listLabels 列出檔案上的標籤。  | 
              
                  modifyLabels | 
                
                  POST /drive/v2/files/{fileId}/modifyLabels 修改套用至檔案的標籤組合。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId} 更新檔案的中繼資料和/或內容。  | 
              
                  touch | 
                
                  POST /drive/v2/files/{fileId}/touch 將檔案的更新時間設為目前的伺服器時間。  | 
              
                  trash | 
                
                  POST /drive/v2/files/{fileId}/trash 將檔案移至垃圾桶。  | 
              
                  untrash | 
                
                  POST /drive/v2/files/{fileId}/untrash 從垃圾桶還原檔案。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId} PUT /upload/drive/v2/files/{fileId} 更新檔案的中繼資料和/或內容。  | 
              
                  watch | 
                
                  POST /drive/v2/files/{fileId}/watch 訂閱檔案變更。  | 
              
REST 資源:v2.parents
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/parents/{parentId} 從檔案中移除父項。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/parents/{parentId} 取得特定父項參照。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{fileId}/parents 為檔案新增上層資料夾。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/parents 列出檔案的上層。  | 
              
REST 資源:v2.permissions
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/permissions/{permissionId} 刪除檔案或共用雲端硬碟的權限。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/permissions/{permissionId} 根據 ID 取得權限。  | 
              
                  getIdForEmail | 
                
                  GET /drive/v2/permissionIds/{email} 傳回電子郵件地址的權限 ID。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{fileId}/permissions 插入檔案或共用雲端硬碟的權限。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/permissions 列出檔案或共用雲端硬碟的權限。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId}/permissions/{permissionId} 使用修補語義更新權限。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId}/permissions/{permissionId} 更新權限。  | 
              
REST 資源:v2.properties
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/properties/{propertyKey} 刪除資源。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/properties/{propertyKey} 根據鍵取得屬性。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{fileId}/properties 將屬性新增至檔案,或更新現有的屬性。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/properties 列出檔案的屬性。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId}/properties/{propertyKey} 更新資源。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId}/properties/{propertyKey} 更新資源。  | 
              
REST 資源:v2.replies
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId} 刪除回覆。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId} 取得回覆。  | 
              
                  insert | 
                
                  POST /drive/v2/files/{fileId}/comments/{commentId}/replies 建立對指定留言的新回覆。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/comments/{commentId}/replies 列出所有留言回覆。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId} 更新現有的回覆。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId} 更新現有的回覆。  | 
              
REST 資源:v2.revisions
| 方法 | |
|---|---|
                  delete | 
                
                  DELETE /drive/v2/files/{fileId}/revisions/{revisionId} 永久刪除檔案版本。  | 
              
                  get | 
                
                  GET /drive/v2/files/{fileId}/revisions/{revisionId} 取得特定修訂版本。  | 
              
                  list | 
                
                  GET /drive/v2/files/{fileId}/revisions 列出檔案的修訂版本。  | 
              
                  patch | 
                
                  PATCH /drive/v2/files/{fileId}/revisions/{revisionId} 更新修訂版本。  | 
              
                  update | 
                
                  PUT /drive/v2/files/{fileId}/revisions/{revisionId} 更新修訂版本。  |