Skip to navigation

Revert File to version

Beta

Publish a new version of a File whose content copies an earlier version. The earlier version stays in the File’s history and the new version becomes current. expectedVersionId must be the File’s current version; the revert is rejected if another version has been published since. Reverting to the current version is rejected.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

file_idstringRequired
ID of the File.

Headers

EARLY-ACCESSstringOptional

Set to true to access beta operations via /api/v3.

Request

This endpoint expects an object.
expectedVersionIdstringRequired
fileVersionIdstringRequired

Response

OK
__typenamestringOptional
archiveReasonstring or nullOptional
archivedbooleanOptional
createdAtstringOptional
creatorobjectOptional
currentVersionIdstring or nullOptional
displayIdstring or nullOptional
folderobjectOptional
idstringOptional
modifiedAtstringOptional
namestring or nullOptional
scratchFileobjectOptional
versionsstringOptionalformat: "uri"
Published versions of the File, newest first.
externalFileIdstring or nullOptionalDeprecated
Use scratchFile to access externalFileId.
filenamestring or nullOptionalDeprecated
Use scratchFile to access filename.
mimeTypestring or nullOptionalDeprecated
Use scratchFile to access mimeType.

Errors

400
File Revert Request Bad Request Error
403
File Revert Request Forbidden Error
404
File Revert Request Not Found Error
409
File Revert Request Conflict Error
429
File Revert Request Too Many Requests Error
500
File Revert Request Internal Server Error