REST Resource: changes
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:Change
JSON 表示法 |
{
"id": string,
"deleted": boolean,
"file": {
object (File )
},
"fileId": string,
"modificationDate": string,
"kind": string,
"type": string,
"teamDriveId": string,
"teamDrive": {
object (TeamDrive )
},
"changeType": string,
"selfLink": string,
"driveId": string,
"drive": {
object (Drive )
}
} |
欄位 |
id |
string (int64 format)
變更的 ID。
|
deleted |
boolean
檔案或共用雲端硬碟是否已從這份變更清單中移除,例如遭到刪除或失去存取權。
|
file |
object (File )
檔案的更新狀態。如果類型為檔案,且檔案尚未從變更清單中移除,就會顯示此值。
|
fileId |
string
與這項變更相關聯的檔案 ID。
|
modificationDate |
string
這項修改的時間。
|
kind |
string
這個值一律為 drive#change 。
|
type (deprecated) |
string
已淘汰:請改用 changeType 。
|
teamDriveId (deprecated) |
string
已淘汰:請改用 driveId 。
|
teamDrive (deprecated) |
object (TeamDrive )
已淘汰:請改用 drive 。
|
changeType |
string
變更類型。可能的值為 file 和 drive 。
|
selfLink |
string
連結至這項變更。
|
driveId |
string
與這項變更相關聯的共用雲端硬碟 ID。
|
drive |
object (Drive )
共用雲端硬碟的更新狀態。如果 changeType 為 drive,使用者仍是共用雲端硬碟的成員,且共用雲端硬碟未遭到刪除,就會顯示這項資料。
|
方法 |
|
已淘汰:請使用 changes.getStartPageToken 和 changes.list 擷取最近的變更。 |
|
取得開始的 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\nRepresentation of a change to a file or shared drive.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"deleted\": boolean, \"file\": { object (/workspace/drive/api/reference/rest/v2/files#File) }, \"fileId\": string, \"modificationDate\": string, \"kind\": string, \"type\": string, \"teamDriveId\": string, \"teamDrive\": { object (/workspace/drive/api/reference/rest/v2/teamdrives#TeamDrive) }, \"changeType\": string, \"selfLink\": string, \"driveId\": string, \"drive\": { object (/workspace/drive/api/reference/rest/v2/drives#Drive) } } ``` |\n\n| Fields ||\n|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The ID of the change. |\n| `deleted` | `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/v2/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 associated with this change. |\n| `modificationDate` | `string` The time of this modification. |\n| `kind` | `string` This is always `drive#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/v2/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| `selfLink` | `string` A link back to this change. |\n| `driveId` | `string` The ID of the shared drive associated with this change. |\n| `drive` | `object (`[Drive](/workspace/drive/api/reference/rest/v2/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| ### [get](/workspace/drive/api/reference/rest/v2/changes/get) | Deprecated: Use `changes.getStartPageToken` and `changes.list` to retrieve recent changes. |\n| ### [getStartPageToken](/workspace/drive/api/reference/rest/v2/changes/getStartPageToken) | Gets the starting pageToken for listing future changes. |\n| ### [list](/workspace/drive/api/reference/rest/v2/changes/list) | Lists the changes for a user or shared drive. |\n| ### [watch](/workspace/drive/api/reference/rest/v2/changes/watch) | Subscribe to changes for a user. |"]]