- URL:https://[root]/content/users/[userName]/items/[itemID]/copy(POST only)
- Version Introduced:ArcGIS Online September 2020
URL for Add Item
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 copy item operation (POST only) creates a new item that is a copy of the original item on the server side.
Copy operation is allowed for the following:
- Original item being copied is owned by the user invoking the copy operation.
- User is an administrator.
- User has itemControl update capability.
The new item created by the copy operation will have system generated itemID.
Hosted services are copied as reference only. Reserved keywords, ratings, views, comments and listing properties are reset for the new item.
Sharing access of the original item is not preserved. Sharing access of new item is set to private.
Relationships and dependencies of the original item are not maintained in the new item.
For a complete listing, see Common parameters.
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 true, the file resources of the original item will be copied over to the new item. Private file resources will not be copied over. If false, the file resources of the original item will not be copied over to the new item. The default is false.
Values: true | false
If true, and if includeResources is set to true as well, then the private resources of the original item will be copied over to the new item. If false, the private file resources of the original item will not be copied over to the new item. The default is false.
Values: true | false
Indicates if the operation was successful.
The Id of the created item.
JSON Response syntax
"success": true | false,
"itemId": "<item id>"
JSON Response example
"message": "Unable to copy item.",
"details": ["Folder 'fc2fa1433c314d489a6909a9990531d5' does not exist."]