Get Started
Portal api methods
Help

PUT api/2.0/files/file/{fileId} This function requires authentication

Description

Updates the information of the selected file with the parameters specified in the request

Parameters
Name Description Type Example
fileId
sent in url
File ID string some text
title
sent in body
New title string some text
lastVersion
sent in body
File last version number number 1234
Example
PUT api/2.0/files/file/some+text
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "title": "some text",
  "lastVersion": 1234
}
Returns

File info

Example Response

application/json

{
  "status": 0,
  "response": {
    "folderId": 12334,
    "version": 3,
    "versionGroup": 1,
    "contentLength": "12345",
    "fileStatus": 2,
    "viewUrl": "http:\/\/www.onlyoffice.com\/viewfile?fileid=2221",
    "fileType": 7,
    "fileExst": ".txt",
    "comment": null,
    "id": 279081436,
    "title": "Some titile.txt",
    "access": 1,
    "shared": false,
    "rootFolderType": 2,
    "updatedBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "created": "2019-08-20T06:39:08.7997977Z",
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "updated": "2019-08-20T06:39:08.7997977Z",
    "providerItem": false
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <folderId>12334</folderId>
    <version>3</version>
    <versionGroup>1</versionGroup>
    <contentLength>12345</contentLength>
    <fileStatus>2</fileStatus>
    <viewUrl>http://www.onlyoffice.com/viewfile?fileid=2221</viewUrl>
    <fileType>7</fileType>
    <fileExst>.txt</fileExst>
    <comment />
    <id>279081436</id>
    <title>Some titile.txt</title>
    <access>1</access>
    <shared>false</shared>
    <rootFolderType>2</rootFolderType>
    <updatedBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </updatedBy>
    <created>2019-08-20T06:39:08.7997977Z</created>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <updated>2019-08-20T06:39:08.7997977Z</updated>
    <providerItem>false</providerItem>
  </response>
</result>