Get Started
Portal api methods
Help

DELETE api/2.0/files/folder/{folderId} This function requires authentication

Description

Deletes the folder with the ID specified in the request

Parameters
Name Description Type Example
folderId
sent in url
Folder ID string some text
deleteAfter
sent in body
Delete after finished Bool value true
immediately
sent in body
Don't move to the Recycle Bin Bool value true
Example
DELETE api/2.0/files/folder/some+text
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "deleteAfter": true,
  "immediately": true
}
Returns

Operation result

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "id": "2b449132-1786-4eb5-a881-834605231e06",
      "operation": 0,
      "progress": 100,
      "error": "",
      "processed": "1",
      "finished": false,
      "url": null,
      "files": [
        {
          "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": 1444442423,
          "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-19T01:39:26.3425599Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2019-08-19T01:39:26.3425599Z",
          "providerItem": false
        }
      ],
      "folders": [
        {
          "parentId": 1444442423,
          "filesCount": 1444442423,
          "foldersCount": 1444442423,
          "id": 1444442423,
          "title": "Some titile",
          "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-19T01:39:26.3425599Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2019-08-19T01:39:26.3425599Z",
          "providerItem": false
        }
      ]
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>2b449132-1786-4eb5-a881-834605231e06</id>
    <operation>0</operation>
    <progress>100</progress>
    <error></error>
    <processed>1</processed>
    <finished>false</finished>
    <url />
    <files>
      <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>1444442423</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-19T01:39:26.3425599Z</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-19T01:39:26.3425599Z</updated>
      <providerItem>false</providerItem>
    </files>
    <folders>
      <parentId>1444442423</parentId>
      <filesCount>1444442423</filesCount>
      <foldersCount>1444442423</foldersCount>
      <id>1444442423</id>
      <title>Some titile</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-19T01:39:26.3425599Z</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-19T01:39:26.3425599Z</updated>
      <providerItem>false</providerItem>
    </folders>
  </response>
</result>