REST Resource: revisions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リソース: Revision
ファイルの改訂のメタデータ。
一部のリソース メソッド(revisions.update
など)では revisionId
が必要です。revisions.list
メソッドを使用して、リビジョンの ID を取得します。
JSON 表現 |
{
"exportLinks": {
string: string,
...
},
"id": string,
"mimeType": string,
"kind": string,
"published": boolean,
"keepForever": boolean,
"md5Checksum": string,
"modifiedTime": string,
"publishAuto": boolean,
"publishedOutsideDomain": boolean,
"publishedLink": string,
"size": string,
"originalFilename": string,
"lastModifyingUser": {
object (User )
}
} |
フィールド |
exportLinks |
map (key: string, value: string)
出力専用。ドキュメント エディタのファイルを特定の形式にエクスポートするためのリンク。 "key": value ペアのリストを含むオブジェクト。例: { "name": "wrench", "mass": "1.3kg", "count": "3" }
|
id |
string
出力専用。リビジョンの ID。
|
mimeType |
string
出力専用。リビジョンの MIME タイプ。
|
kind |
string
出力専用。リソースの種類を示します。値は固定文字列 "drive#revision" です。
|
published |
boolean
このリビジョンが公開されているかどうか。これは、ドキュメント エディタ ファイルにのみ適用されます。
|
keepForever |
boolean
このリビジョンを HEAD リビジョンでなくなっても永続的に保持するかどうか。設定されていない場合、リビジョンは新しいコンテンツがアップロードされてから 30 日後に自動的に削除されます。この設定は、1 つのファイルに対して最大 200 個のリビジョンに適用できます。 このフィールドは、ドライブ内のバイナリ コンテンツを含むファイルにのみ適用されます。
|
md5Checksum |
string
出力専用。リビジョンのコンテンツの MD5 チェックサム。これは、Google ドライブ内のバイナリ コンテンツを含むファイルにのみ適用されます。
|
modifiedTime |
string
出力専用。リビジョンが最後に変更された時刻(RFC 3339 日付 / 時刻)。
|
publishAuto |
boolean
以降のリビジョンが自動的に再公開されるかどうか。これは、ドキュメント エディタ ファイルにのみ適用されます。
|
publishedOutsideDomain |
boolean
このリビジョンがドメイン外に公開されているかどうか。これは、ドキュメント エディタ ファイルにのみ適用されます。
|
publishedLink |
string
出力専用。公開されたリビジョンへのリンク。これは、ドキュメント エディタのファイルにのみ入力されます。
|
size |
string (int64 format)
出力専用。リビジョンのコンテンツのサイズ(バイト単位)。これは、Google ドライブ内のバイナリ コンテンツを含むファイルにのみ適用されます。
|
originalFilename |
string
出力専用。このリビジョンの作成に使用された元のファイル名。これは、Google ドライブ内のバイナリ コンテンツを含むファイルにのみ適用されます。
|
lastModifyingUser |
object (User )
出力専用。このリビジョンを最後に変更したユーザー。このフィールドは、ログインしたユーザーが最後に変更を行った場合にのみ入力されます。
|
メソッド |
|
ファイルのバージョンを完全に削除します。 |
|
ID でリビジョンのメタデータまたはコンテンツを取得します。 |
|
ファイルのリビジョンを一覧表示します。 |
|
パッチのセマンティクスを使用してリビジョンを更新します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# REST Resource: revisions\n\n- [Resource: Revision](#Revision)\n - [JSON representation](#Revision.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Revision\n------------------\n\nThe metadata for a revision to a file.\n\nSome resource methods (such as `revisions.update`) require a `revisionId`. Use the `revisions.list` method to retrieve the ID for a revision.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"exportLinks\": { string: string, ... }, \"id\": string, \"mimeType\": string, \"kind\": string, \"published\": boolean, \"keepForever\": boolean, \"md5Checksum\": string, \"modifiedTime\": string, \"publishAuto\": boolean, \"publishedOutsideDomain\": boolean, \"publishedLink\": string, \"size\": string, \"originalFilename\": string, \"lastModifyingUser\": { object (/workspace/drive/api/reference/rest/v3/User) } } ``` |\n\n| Fields ||\n|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `exportLinks` | `map (key: string, value: string)` Output only. Links for exporting Docs Editors files to specific formats. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `id` | `string` Output only. The ID of the revision. |\n| `mimeType` | `string` Output only. The MIME type of the revision. |\n| `kind` | `string` Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#revision\"`. |\n| `published` | `boolean` Whether this revision is published. This is only applicable to Docs Editors files. |\n| `keepForever` | `boolean` Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive. |\n| `md5Checksum` | `string` Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive. |\n| `modifiedTime` | `string` Output only. The last time the revision was modified (RFC 3339 date-time). |\n| `publishAuto` | `boolean` Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files. |\n| `publishedOutsideDomain` | `boolean` Whether this revision is published outside the domain. This is only applicable to Docs Editors files. |\n| `publishedLink` | `string` Output only. A link to the published revision. This is only populated for Docs Editors files. |\n| `size` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive. |\n| `originalFilename` | `string` Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive. |\n| `lastModifyingUser` | `object (`[User](/workspace/drive/api/reference/rest/v3/User)`)` Output only. The last user to modify this revision. This field is only populated when the last modification was performed by a signed-in user. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------|----------------------------------------------|\n| ### [delete](/workspace/drive/api/reference/rest/v3/revisions/delete) | Permanently deletes a file version. |\n| ### [get](/workspace/drive/api/reference/rest/v3/revisions/get) | Gets a revision's metadata or content by ID. |\n| ### [list](/workspace/drive/api/reference/rest/v3/revisions/list) | Lists a file's revisions. |\n| ### [update](/workspace/drive/api/reference/rest/v3/revisions/update) | Updates a revision with patch semantics. |"]]