• Post category:Папки
  • Запись изменена:03.11.2022

GET api/2.0/files/@root

Для этой функции требуется аутентификация.

Описание
Возвращает все разделы, соответствующие параметрам, указанным в запросе.

Параметры

НазваниеОписаниеТипПример
userIdOrGroupId

sent in url
Идентификатор пользователя или группы

необязательно
guid9924256A-739C-462b-AF15-E652A3B1B6EB
filterType

sent in url
Тип фильтра

необязательно
None, FilesOnly, FoldersOnly, DocumentsOnly, PresentationsOnly, SpreadsheetsOnly, ImagesOnly, ByUser, ByDepartment, ArchiveOnly, ByExtension, MediaOnly
searchInContent

sent in url
Поиск в контентных файлахлогическийtrue
withSubfolders

sent in url
Корневые папки с подпапками или без нихлогическийtrue
withoutTrash

sent in url
Корневые папки с корзиной или без неелогическийtrue
withoutAdditionalFolder

sent in url
Корневые папки с дополнительными папками или без нихлогическийtrue
Пример
GET api/2.0/files/@root?userIdOrGroupId=9924256A-739C-462b-AF15-E652A3B1B6EB&filterType=none&searchInContent=True&withSubfolders=True&withoutTrash=True&withoutAdditionalFolder=True
Host: yourportal.r7-office.ru
Content-Type: application/json
Accept: application/json

Возвращает
Разделы

Пример ответа

application/json

{
  "status": 0,
  "response": [
    {
      "files": [
        {
          "folderId": 12334,
          "version": 3,
          "versionGroup": 1,
          "contentLength": "12.06 KB",
          "pureContentLength": 12345,
          "fileStatus": 2,
          "viewUrl": "http:\/\/www.Р7.com\/viewfile?fileid=2221",
          "fileType": 7,
          "fileExst": ".txt",
          "comment": null,
          "id": 1757415677,
          "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": "2022-10-09T20:03:09.4880730Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.4880730Z"
        },
        {
          "folderId": 12334,
          "version": 3,
          "versionGroup": 1,
          "contentLength": "12.06 KB",
          "pureContentLength": 12345,
          "fileStatus": 2,
          "viewUrl": "http:\/\/www.Р7.com\/viewfile?fileid=2221",
          "fileType": 7,
          "fileExst": ".txt",
          "comment": null,
          "id": 1757415677,
          "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": "2022-10-09T20:03:09.4880730Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.4880730Z"
        }
      ],
      "folders": [
        {
          "parentId": 1757415677,
          "filesCount": 1757415677,
          "foldersCount": 1757415677,
          "id": 1757415677,
          "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": "2022-10-09T20:03:09.4880730Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.4880730Z"
        },
        {
          "parentId": 1757415677,
          "filesCount": 1757415677,
          "foldersCount": 1757415677,
          "id": 1757415677,
          "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": "2022-10-09T20:03:09.4880730Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.4880730Z"
        }
      ],
      "current": {
        "parentId": 1757415677,
        "filesCount": 1757415677,
        "foldersCount": 1757415677,
        "id": 1757415677,
        "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": "2022-10-09T20:03:09.4880730Z",
        "createdBy": {
          "id": "00000000-0000-0000-0000-000000000000",
          "displayName": "Mike Zanyatski",
          "title": "Manager",
          "avatarSmall": "url to small avatar",
          "profileUrl": ""
        },
        "updated": "2022-10-09T20:03:09.4880730Z"
      },
      "pathParts": {
        "key": "Key",
        "path": "\/\/path\/\/to\/\/folder"
      },
      "startIndex": 0,
      "count": 4,
      "total": 4
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <files>
      <folderId>12334</folderId>
      <version>3</version>
      <versionGroup>1</versionGroup>
      <contentLength>12.06 KB</contentLength>
      <pureContentLength>12345</pureContentLength>
      <fileStatus>2</fileStatus>
      <viewUrl>http://www.Р7.com/viewfile?fileid=2221</viewUrl>
      <fileType>7</fileType>
      <fileExst>.txt</fileExst>
      <comment />
      <id>1757415677</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>2022-10-09T20:03:09.4880730Z</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>2022-10-09T20:03:09.4880730Z</updated>
    </files>
    <files>
      <folderId>12334</folderId>
      <version>3</version>
      <versionGroup>1</versionGroup>
      <contentLength>12.06 KB</contentLength>
      <pureContentLength>12345</pureContentLength>
      <fileStatus>2</fileStatus>
      <viewUrl>http://www.Р7.com/viewfile?fileid=2221</viewUrl>
      <fileType>7</fileType>
      <fileExst>.txt</fileExst>
      <comment />
      <id>1757415677</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>2022-10-09T20:03:09.4880730Z</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>2022-10-09T20:03:09.4880730Z</updated>
    </files>
    <folders>
      <parentId>1757415677</parentId>
      <filesCount>1757415677</filesCount>
      <foldersCount>1757415677</foldersCount>
      <id>1757415677</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>2022-10-09T20:03:09.4880730Z</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>2022-10-09T20:03:09.4880730Z</updated>
    </folders>
    <folders>
      <parentId>1757415677</parentId>
      <filesCount>1757415677</filesCount>
      <foldersCount>1757415677</foldersCount>
      <id>1757415677</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>2022-10-09T20:03:09.4880730Z</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>2022-10-09T20:03:09.4880730Z</updated>
    </folders>
    <current>
      <parentId>1757415677</parentId>
      <filesCount>1757415677</filesCount>
      <foldersCount>1757415677</foldersCount>
      <id>1757415677</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>2022-10-09T20:03:09.4880730Z</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>2022-10-09T20:03:09.4880730Z</updated>
    </current>
    <pathParts>
      <key>Key</key>
      <path>//path//to//folder</path>
    </pathParts>
    <startIndex>0</startIndex>
    <count>4</count>
    <total>4</total>
  </response>
</result>