Method: changes.list

列出使用者或共用雲端硬碟的異動。

HTTP 要求

GET https://www.googleapis.com/drive/v3/changes

這個網址使用 gRPC 轉碼語法。

查詢參數

參數
driveId

string

要傳回變更的共用雲端硬碟。如果指定的變更 ID 會顯示共用雲端硬碟,請使用合併的雲端硬碟 ID 和變更 ID 做為 ID。

includeCorpusRemovals

boolean

如果在提出要求時,使用者仍可存取該檔案,變更是否應包含檔案資源,即使檔案已從變更清單中移除,且這個檔案也沒有其他變更項目也一樣。

includeItemsFromAllDrives

boolean

是否同時包含「我的雲端硬碟」和共用雲端硬碟項目。

includeRemoved

boolean

是否包含變更,指出項目已從變更清單中移除,例如刪除或失去存取權。

includeTeamDriveItems
(deprecated)

boolean

已淘汰:請改用 includeItemsFromAllDrives

pageSize

integer

每頁傳回的變更數量上限。

pageToken

string

繼續先前在下一頁提出清單要求的權杖。此值應設為前一個回應的「nextPageToken」值,或來自 getStartPageToken 方法的回應。

restrictToMyDrive

boolean

是否僅限在「我的雲端硬碟」階層中變更結果。這項操作會忽略檔案的變更,例如「應用程式資料」資料夾中的檔案,或是尚未新增到「我的雲端硬碟」的共用檔案。

spaces

string

要在語料庫中查詢的空格清單 (以半形逗號分隔)。支援的值為「drive」和「appDataFolder」。

supportsAllDrives

boolean

要求的應用程式是否支援「我的雲端硬碟」和共用雲端硬碟。

supportsTeamDrives
(deprecated)

boolean

已淘汰:請改用 supportsAllDrives

teamDriveId
(deprecated)

string

已淘汰:請改用 driveId

includePermissionsForView

string

指定要在回應中加入哪些其他檢視表權限。僅支援「已發布」。

includeLabels

string

要加入回應 labelInfo 部分的標籤 ID 清單 (以半形逗號分隔)。

要求主體

要求主體必須為空白。

回應主體

使用者的變更清單。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "kind": string,
  "nextPageToken": string,
  "newStartPageToken": string,
  "changes": [
    {
      object (Change)
    }
  ]
}
欄位
kind

string

識別資源的種類。值:固定字串 "drive#changeList"

nextPageToken

string

下一頁異動的頁面憑證。如果變更清單已結束,則資料不會顯示。網頁權杖不會過期。

newStartPageToken

string

供日後變更的起始網頁權杖。只有在目前變更清單結束時才會顯示此選項。網頁權杖不會過期。

changes[]

object (Change)

變更清單。如果已填入 nextPageToken,則這份清單可能不完整,而且必須擷取多頁的結果。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

部分範圍受到限制,必須接受安全性評估,應用程式才能使用這些範圍。詳情請參閱授權指南