Method: revisions.get
HTTP 请求
GET https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}
网址采用 gRPC 转码语法。
路径参数
参数 |
fileId |
string
文件的 ID。
|
revisionId |
string
修订版本的 ID。
|
查询参数
参数 |
acknowledgeAbuse |
boolean
用户是否已确认下载已知恶意软件或其他存在滥用行为的文件的风险。只有当 alt 参数设为 media 且用户是文件的所有者或文件所在共享云端硬盘的组织者时,这种情况才适用。
|
响应正文
如果成功,则响应正文包含一个 Revision
实例。
授权范围
需要以下 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
部分范围受到限制,需要进行安全评估,您的应用才能使用它们。有关详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-03。
[null,null,["最后更新时间 (UTC):2024-09-03。"],[[["Retrieves metadata or content of a specific file revision using its ID."],["Requires providing `fileId` and `revisionId` as path parameters in the request URL."],["Optionally, acknowledge potential risks when downloading files by setting the `acknowledgeAbuse` query parameter."],["Successful responses return a `Revision` object containing the requested information."],["Requires authorization with specific OAuth scopes like `https://www.googleapis.com/auth/drive` or others depending on the access level needed."]]],["This outlines how to retrieve a file revision's metadata or content using a `GET` HTTP request. The request requires a `fileId` and `revisionId` as path parameters. An optional `acknowledgeAbuse` boolean query parameter is available. The request body must be empty, and the successful response will contain a `Revision` instance. Authorization requires one of several specified OAuth scopes, some of which have restricted use.\n"]]