Copy folder

Overview

This API copies an existing folder and its contents from its parent folder to another folder.

  • In case of conflict, where the source folder name clashes with any of the folder names in the destination, this API gives an option to merge the contents of the source folder and the destination folder. This conflict resolution is decided based upon the query parameter 'merge'. The result is:
    • creation of a new folder ( within the destination parent folder ) when no conflict occurs.
    • In case of conflict and the user prefers to merge, the contents of the conflicting folder( within the destination parent folder ) are merged with the contents of the source folder.
    • If merge parameter is not passed, copy operation is aborted on conflict.

Permissions

  • User must have view folder permission on the folder being copied and create folder permission on destination folder.
SecurityoAuthUser
Request
path Parameters
ID
required
number

Folder id to be copied

Example: 40960000000012
query Parameters
merge
string

Parameter to decide if contents of folders are to be merged on conflict.

Example: merge=yes
header Parameters
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Request Body schema: application/json

Request body for copying a folder.

required
object (parent)
required
object (language)

Language passed in the request must be assigned to user.

Responses
201

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

406

Not acceptable

412

Preconditions failed

500

Internal server error

post/folders/{ID}/copy
Request samples
application/json
{
  • "parent": {
    },
  • "language": {
    }
}
Response samples
application/json
{
  • "code": "400-264",
  • "developerMessage": "Request body is mandatory. Please provide body for the request."
}