GET api/2.0/files/file/{fileId}/restoreversion

Description

Restores a file version specified in the request.

Parameters
Name Description Type Example
fileId
sent in url
File ID number 1234
version
sent in body
File version number 1234
url
sent in body
File version URL string some text
doc
sent in body
Shared token string some text
Example
GET api/2.0/files/file/1234/restoreversion
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "version": 1234,
  "url": "some text",
  "doc": "some text"
}
Returns

Version history data: file ID, key, file version, version group, a user who updated a file, creation time, history changes in the string format, list of history changes, server version

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "ID": 1234,
      "Key": "some text",
      "Version": 1234,
      "VersionGroup": 1234,
      "ChangesHistory": "some text",
      "ServerVersion": "some text"
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <ID>1234</ID>
    <Key>some text</Key>
    <Version>1234</Version>
    <VersionGroup>1234</VersionGroup>
    <ChangesHistory>some text</ChangesHistory>
    <ServerVersion>some text</ServerVersion>
  </response>
</result>