• Post category:Операции
  • Запись изменена:03.11.2022

PUT api/2.0/files/fileops/move

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

Перемещает все выбранные файлы и папки в папку с идентификатором, указанным в запросе.

Параметры

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

sent in body
Идентификатор папки назначениястроковыйтекст
folderIds

sent in body
Список идентификаторов папокCollection of strings

collection
текст
fileIds

sent in body
Список идентификаторов файловCollection of strings

collection
текст
conflictResolveType

sent in body
Поведение при перезаписи: пропустить (0), перезаписать (1) или дублировать (2)Skip, Overwrite, Duplicate

Пропустить, перезаписать, дублировать

deleteAfter

sent in body
Удаляет после завершениялогическийtrue
Пример
PUT api/2.0/files/fileops/move
Host: yourportal.r7-office.ru
Content-Type: application/json
Accept: application/json

{
  "destFolderId": "some text",
  "folderIds": [
    "some text"
  ],
  "fileIds": [
    "some text"
  ],
  "conflictResolveType": "skip",
  "deleteAfter": true
}

Возвращает
Результат операции

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

application/json

{
  "status": 0,
  "response": [
    {
      "id": "640ac1b5-427e-4b6d-b7ff-cc6ca304c3ab",
      "operation": 0,
      "progress": 100,
      "error": "",
      "processed": "1",
      "finished": false,
      "url": null,
      "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": 1944687431,
          "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.5397320Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.5397320Z"
        }
      ],
      "folders": [
        {
          "parentId": 1944687431,
          "filesCount": 1944687431,
          "foldersCount": 1944687431,
          "id": 1944687431,
          "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.5397320Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2022-10-09T20:03:09.5397320Z"
        }
      ]
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>640ac1b5-427e-4b6d-b7ff-cc6ca304c3ab</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>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>1944687431</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.5397320Z</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.5397320Z</updated>
    </files>
    <folders>
      <parentId>1944687431</parentId>
      <filesCount>1944687431</filesCount>
      <foldersCount>1944687431</foldersCount>
      <id>1944687431</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.5397320Z</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.5397320Z</updated>
    </folders>
  </response>
</result>