REST Resource: changes
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:更改
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 为“云端硬盘”,且用户仍是共享云端硬盘的成员,并且共享云端硬盘尚未被删除,则此字段会显示。
|
方法 |
|
已废弃:请使用 changes.getStartPageToken 和 changes.list 检索近期更改。 |
|
获取用于列出未来更改的起始 pageToken。 |
|
列出用户或共享云端硬盘的更改。 |
|
订阅用户的更改。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):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. |"]]