v3
Drive

Restore a Drive file to a prior generation

Restore a Drive file to a previously retained GCS generation.

The restore is atomic: GCS uses `if_generation_match` against the current
live generation, so a half-restored read is impossible. The chosen
generation is copied on top of the live path, becoming the new live
generation while the prior live generation is retained as noncurrent.
post/v3/teams/{team_id}/drive/files/restore

Path parameters

team_idstring required

Request body

pathstring required

Drive-relative path of the file to restore

generationinteger required

GCS generation ID to restore as the new live version

Response

File restored successfully

pathstring required

Drive-relative path that was restored

new_generationinteger required

New live generation ID after the restore

restored_frominteger required

Generation ID that was promoted to live

updatedstring date-time required

Timestamp of the new live generation

size_bytesinteger required

Size of the restored file in bytes

Changes

No recorded changes to this endpoint across all 2 revisions of this API.