- URL:
- https://[root]/content/users/[userName]/items/[itemID]/copy
- Methods:
POST
- Version Introduced:
- September 2020 | ArcGIS Enterprise 10.9
Example usage
The following is a sample ArcGIS Online request for the copy
operation:
https://www.arcgis.com/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/copy
title=MyNewItem Title
tags=MyTag1,MyTag2
folder=ea433f31f1bd4d6787cf6a82b0a8a7a5
includeResources=true
copyPrivateResources=true
The following is a sample ArcGIS Enterprise request for the copy operation:
POST /webadaptor/sharing/rest/content/users/jsmith/items//b512083cd1b64e2da1d3f66dbb135956/copy HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
title=MyNewItem Title&folder=ea433f31f1bd4d6787cf6a82b0a8a7a5&tags=MyTag1,MyTag2&includeResources=false©PrivateResources=false&=pjson
Description
The copy
operation creates a new item that is a copy of the original item on the server side. The newly created item will have a system generated item
. The sharing access of the original item is not preserved for the copied item, which will have its sharing access set to private. As well, the relationships and dependencies of the original item are not maintained in the new item.
This operation is allowed in any of the following scenarios:
- The original item being copied is owned by the user invoking the
copy
operation. - The user is an administrator.
- The user has
item
update capability.Control
Request parameters
Parameter | Details |
---|---|
| The title of the destination item. If not specified, title of the original item is used. |
| New set of tags (comma separated) of the destination item. |
| Folder Id of the destination item. If the folder Id is not specified, then the item remains in the same folder. If the administrator invokes a copy of an item belonging to another user, and does not specify the folder Id, the item gets created in the root folder of the administrator. |
| If Values: |
| If Values: |
| The response format. The default format is Values: |
Response properties
Property | Details |
---|---|
| Indicates if the operation was successful. |
| The Id of the created item. |
JSON Response syntax
{
"success": <true | false>,
"itemId": "<item id>"
}
JSON Response examples
{
"success": true,
"id": "ea433f31f1bd4d6787cf6a82b0a8a7a5"
}
{
"error": {
"code": 400,
"message": "Unable to copy item.",
"details": ["Folder 'fc2fa1433c314d489a6909a9990531d5' does not exist."]
}
}