REST Resource: revisions
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
منبع: تجدید نظر
فراداده برای بازبینی یک فایل.
برخی از روشهای منبع (مانند revisions.update
) به revisionId
نیاز دارند. از روش revisions.list
برای بازیابی شناسه یک نسخه استفاده کنید.
نمایندگی 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 فقط خروجی شناسه تجدید نظر. |
mimeType | string فقط خروجی نوع MIME ویرایش. |
kind | string فقط خروجی مشخص می کند که این چه نوع منبعی است. مقدار: رشته ثابت "drive#revision" . |
published | boolean آیا این ویرایش منتشر شده است. این فقط برای فایلهای Docs Editors قابل اجرا است. |
keepForever | boolean آیا این بازبینی برای همیشه حفظ شود، حتی اگر دیگر نسخه اصلی نباشد. اگر تنظیم نشود، بازبینی بهطور خودکار 30 روز پس از آپلود محتوای جدیدتر پاک میشود. این را می توان روی حداکثر 200 ویرایش برای یک فایل تنظیم کرد. این فیلد فقط برای فایلهای دارای محتوای باینری در Drive قابل استفاده است. |
md5Checksum | string فقط خروجی جمع کنترلی MD5 محتوای بازبینی. این فقط برای فایلهای دارای محتوای باینری در Drive قابل اجرا است. |
modifiedTime | string فقط خروجی آخرین باری که ویرایش اصلاح شد (RFC 3339 تاریخ-زمان). |
publishAuto | boolean آیا بازبینیهای بعدی بهطور خودکار دوباره منتشر میشوند یا خیر. این فقط برای فایلهای Docs Editors قابل اجرا است. |
publishedOutsideDomain | boolean آیا این ویرایش خارج از دامنه منتشر شده است. این فقط برای فایلهای Docs Editors قابل اجرا است. |
publishedLink | string فقط خروجی پیوندی به ویرایش منتشر شده. این فقط برای فایلهای Docs Editors پر شده است. |
size | string ( int64 format) فقط خروجی اندازه محتوای ویرایش بر حسب بایت. این فقط برای فایلهای دارای محتوای باینری در Drive قابل اجرا است. |
originalFilename | string فقط خروجی نام فایل اصلی مورد استفاده برای ایجاد این ویرایش. این فقط برای فایلهای دارای محتوای باینری در Drive قابل اجرا است. |
lastModifyingUser | object ( User ) فقط خروجی آخرین کاربری که این ویرایش را تغییر داده است. این فیلد فقط زمانی پر می شود که آخرین تغییر توسط یک کاربر وارد شده انجام شده باشد. |
روش ها |
---|
| نسخه فایل را برای همیشه حذف می کند. |
| فراداده یا محتوای یک ویرایش را با شناسه دریافت می کند. |
| ویرایش های یک فایل را فهرست می کند. |
| یک ویرایش را با معنای پچ به روز می کند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],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. |"]]