REST Resource: revisions
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risorsa: Revisione
I metadati di una revisione di un file.
Alcuni metodi di risorse (come revisions.update
) richiedono un revisionId
. Utilizza il metodo revisions.list
per recuperare l'ID di una revisione.
Rappresentazione 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 )
}
} |
Campi |
exportLinks |
map (key: string, value: string)
Solo output. Link per l'esportazione dei file degli editor di documenti in formati specifici. Un oggetto contenente un elenco di coppie "key": value . Esempio: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
id |
string
Solo output. L'ID della revisione.
|
mimeType |
string
Solo output. Il tipo MIME della revisione.
|
kind |
string
Solo output. Identifica il tipo di risorsa. Valore: la stringa fissa "drive#revision" .
|
published |
boolean
Indica se questa revisione è pubblicata. Questo vale solo per i file degli editor di documenti.
|
keepForever |
boolean
Indica se conservare questa revisione per sempre, anche se non è più la revisione principale. Se non viene impostata, la revisione verrà eliminata automaticamente 30 giorni dopo il caricamento di contenuti più recenti. Questo limite può essere impostato su un massimo di 200 revisioni per un file. Questo campo è applicabile solo ai file con contenuti binari in Drive.
|
md5Checksum |
string
Solo output. Il checksum MD5 dei contenuti della revisione. Questo vale solo per i file con contenuti binari su Drive.
|
modifiedTime |
string
Solo output. L'ultima volta che la revisione è stata modificata (data e ora RFC 3339).
|
publishAuto |
boolean
Indica se le revisioni successive verranno ripubblicate automaticamente. Questo vale solo per i file degli editor di documenti.
|
publishedOutsideDomain |
boolean
Indica se questa revisione è pubblicata al di fuori del dominio. Questo vale solo per i file degli editor di documenti.
|
publishedLink |
string
Solo output. Un link alla revisione pubblicata. Questo campo viene compilato solo per i file degli editor di documenti.
|
size |
string (int64 format)
Solo output. Le dimensioni dei contenuti della revisione in byte. Questo vale solo per i file con contenuti binari su Drive.
|
originalFilename |
string
Solo output. Il nome file originale utilizzato per creare questa revisione. Questo vale solo per i file con contenuti binari su Drive.
|
lastModifyingUser |
object (User )
Solo output. L'ultimo utente a modificare questa revisione. Questo campo viene compilato solo quando l'ultima modifica è stata eseguita da un utente che ha eseguito l'accesso.
|
Metodi |
|
Elimina definitivamente una versione del file. |
|
Recupera i metadati o i contenuti di una revisione in base all'ID. |
|
Elenca le revisioni di un file. |
|
Aggiorna una revisione con la semantica delle patch. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]