REST Resource: changes
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:Change
JSON 表示法 |
{
"kind": string,
"removed": boolean,
"file": {
object (File )
},
"fileId": string,
"time": string,
"driveId": string,
"type": string,
"teamDriveId": string,
"teamDrive": {
object (TeamDrive )
},
"changeType": string,
"drive": {
object (Drive )
}
} |
欄位 |
kind |
string
表示資源的種類。值:固定字串 "drive#change" 。
|
removed |
boolean
檔案或共用雲端硬碟是否已從這份變更清單中移除,例如遭到刪除或失去存取權。
|
file |
object (File )
檔案的更新狀態。如果類型為檔案,且檔案尚未從變更清單中移除,就會顯示此值。
|
fileId |
string
已變更的檔案 ID。
|
time |
string
這項變更的時間 (RFC 3339 日期時間)。
|
driveId |
string
與這項變更相關聯的共用雲端硬碟 ID。
|
type (deprecated) |
string
已淘汰:請改用 changeType 。
|
teamDriveId (deprecated) |
string
已淘汰:請改用 driveId 。
|
teamDrive (deprecated) |
object (TeamDrive )
已淘汰:請改用 drive 。
|
changeType |
string
變更類型。可能的值為 file 和 drive 。
|
drive |
object (Drive )
共用雲端硬碟的更新狀態。如果 changeType 為 drive,使用者仍是共用雲端硬碟的成員,且共用雲端硬碟未遭到刪除,就會顯示這項資料。
|
方法 |
|
取得開始的 pageToken,以便列出日後的變更。 |
|
列出使用者或共用雲端硬碟的變更。 |
|
訂閱使用者的變更。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# REST Resource: changes\n\n- [Resource: Change](#Change)\n - [JSON representation](#Change.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Change\n----------------\n\nA change to a file or shared drive.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"removed\": boolean, \"file\": { object (/workspace/drive/api/reference/rest/v3/files#File) }, \"fileId\": string, \"time\": string, \"driveId\": string, \"type\": string, \"teamDriveId\": string, \"teamDrive\": { object (/workspace/drive/api/reference/rest/v3/teamdrives#TeamDrive) }, \"changeType\": string, \"drive\": { object (/workspace/drive/api/reference/rest/v3/drives#Drive) } } ``` |\n\n| Fields ||\n|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string `\"drive#change\"`. |\n| `removed` | `boolean` Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. |\n| `file` | `object (`[File](/workspace/drive/api/reference/rest/v3/files#File)`)` The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. |\n| `fileId` | `string` The ID of the file which has changed. |\n| `time` | `string` The time of this change (RFC 3339 date-time). |\n| `driveId` | `string` The ID of the shared drive associated with this change. |\n| `type` **(deprecated)** | `string` | This item is deprecated! Deprecated: Use `changeType` instead. |\n| `teamDriveId` **(deprecated)** | `string` | This item is deprecated! Deprecated: Use `driveId` instead. |\n| `teamDrive` **(deprecated)** | `object (`[TeamDrive](/workspace/drive/api/reference/rest/v3/teamdrives#TeamDrive)`)` | This item is deprecated! Deprecated: Use `drive` instead. |\n| `changeType` | `string` The type of the change. Possible values are `file` and `drive`. |\n| `drive` | `object (`[Drive](/workspace/drive/api/reference/rest/v3/drives#Drive)`)` The updated state of the shared drive. Present if the changeType is drive, the user is still a member of the shared drive, and the shared drive has not been deleted. |\n\n| Methods ------- ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| ### [getStartPageToken](/workspace/drive/api/reference/rest/v3/changes/getStartPageToken) | Gets the starting pageToken for listing future changes. |\n| ### [list](/workspace/drive/api/reference/rest/v3/changes/list) | Lists the changes for a user or shared drive. |\n| ### [watch](/workspace/drive/api/reference/rest/v3/changes/watch) | Subscribes to changes for a user. |"]]