# Copy

## Copy

> Copy (duplicate) a published item.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/PubItems/{id}/Copy":{"post":{"tags":["3-Publishing//0-Basic Operations"],"summary":"Copy","description":"Copy (duplicate) a published item.","operationId":"72733c90-3545-47b7-a2ca-c029b4ce105b","parameters":[{"name":"id","in":"path","description":"ID of Pub item to duplicate.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The Published item to be copied.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/CopyPubItem"}}}},"responses":{"201":{"description":"Created","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/PubItem"}}}},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CopyPubItem":{"type":"object","properties":{"parentId":{"type":"integer","description":"<para type=\"description\">ID of a new parent published item.</para>\r\n<para type=\"description\">To obtain the published item ID, use the Get-PubItem command.</para>","format":"int32"},"previousId":{"type":"integer","description":"<para type=\"description\">ID of a sibling item after which to place the specified published item.</para>\r\n<para type=\"description\">To obtain the sibling item ID, use the Get-PubItem command.</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Copy a published item</para>\r\n<para type=\"description\"></para>"},"PubItem":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"adminCreate":{"type":"string","description":"<para type=\"description\">User who created the object.</para>","nullable":true},"adminLastMod":{"type":"string","description":"<para type=\"description\">User who last modified the object.</para>","nullable":true},"timeCreate":{"type":"string","description":"<para type=\"description\">Time when the object was created.</para>","format":"date-time"},"timeLastMod":{"type":"string","description":"<para type=\"description\">Time when the object was last modified.</para>","format":"date-time"},"maintenanceMessages":{"$ref":"#/components/schemas/MaintenanceMessages"},"inheritMaintenance":{"type":"boolean","description":"<para type=\"description\">Inherit Maintenance.</para>"},"replicateMaintenance":{"type":"boolean","description":"<para type=\"description\">Replicate Maintenance.</para>"},"name":{"type":"string","description":"<para type=\"description\">Name of the published item.</para>","nullable":true},"type":{"$ref":"#/components/schemas/RASPubObject"},"parentId":{"type":"integer","description":"<para type=\"description\">ID of the parent folder of the published item.</para>","format":"int32"},"previousId":{"type":"integer","description":"<para type=\"description\">ID of the previous published item.</para>","format":"int32"},"description":{"type":"string","description":"<para type=\"description\">Description of the published item.</para>","nullable":true},"enabledMode":{"$ref":"#/components/schemas/PubResourceEnabledMode"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the published item is enabled or not.</para>"},"publishToSite":{"type":"array","items":{"type":"integer","format":"int32"},"description":"<para type=\"description\">List of the IDs of all the sites this item is published to.</para>","nullable":true},"preferredRoutingEnabled":{"type":"boolean","description":"<para type=\"description\">Whether Preferred Routing is enabled or not.</para>"},"preferredRoutes":{"type":"array","items":{"$ref":"#/components/schemas/PubPreferredRoute"},"description":"<para type=\"description\">The list of Preferred Routes.</para>","nullable":true},"filter":{"$ref":"#/components/schemas/PubItemFilter"}},"additionalProperties":false,"description":"<para type=\"synopsis\">RAS Published Item</para>\r\n<para type=\"description\"></para>"},"MaintenanceMessages":{"type":"object","properties":{"maintenanceMessage_en_US":{"type":"string","description":"<para type=\"description\">Maintenance message in English.</para>","nullable":true},"maintenanceMessage_ja_JP":{"type":"string","description":"<para type=\"description\">Maintenance message in Japanese.</para>","nullable":true},"maintenanceMessage_fr_FR":{"type":"string","description":"<para type=\"description\">Maintenance message in French.</para>","nullable":true},"maintenanceMessage_es_ES":{"type":"string","description":"<para type=\"description\">Maintenance message in Spanish.</para>","nullable":true},"maintenanceMessage_it_IT":{"type":"string","description":"<para type=\"description\">Maintenance message in Italian.</para>","nullable":true},"maintenanceMessage_pt_BR":{"type":"string","description":"<para type=\"description\">Maintenance message in Portuguese.</para>","nullable":true},"maintenanceMessage_nl_NL":{"type":"string","description":"<para type=\"description\">Maintenance message in Dutch.</para>","nullable":true},"maintenanceMessage_zh_TW":{"type":"string","description":"<para type=\"description\">Maintenance message in Chinese (Traditional).</para>","nullable":true},"maintenanceMessage_zh_CN":{"type":"string","description":"<para type=\"description\">Maintenance message in Chinese (Simplified).</para>","nullable":true},"maintenanceMessage_ko_KR":{"type":"string","description":"<para type=\"description\">Maintenance message in Korean.</para>","nullable":true},"maintenanceMessage_de_DE":{"type":"string","description":"<para type=\"description\">Maintenance message in German.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Contains a set of maintenance messages in various languages</para>\r\n<para type=\"description\"></para>"},"RASPubObject":{"enum":[["0 = Any","1 = Folder","2 = RDSApp","3 = RDSDesktop","4 = VDIDesktop","5 = PCDesktop","6 = PCApp","7 = VDIApp","8 = AVDApp","9 = AVDDesktop","10 = LocalApp"]],"type":"string","description":"<para type=\"synopsis\">RAS Publishing Objects</para>\r\n<para type=\"description\"></para>","format":"int32"},"PubResourceEnabledMode":{"enum":[["0 = Disabled","1 = Enabled","2 = Maintenance"]],"type":"string","description":"<para type=\"synopsis\">Published resource availability modes.</para>\r\n<para type=\"description\"></para>","format":"int32"},"PubPreferredRoute":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"priority":{"type":"integer","description":"<para type=\"description\">Priority of the object.</para>","format":"int32"},"name":{"type":"string","description":"<para type=\"description\">The Name of the Publishing Route</para>","nullable":true},"description":{"type":"string","description":"<para type=\"description\">Description of the Publishing Route</para>","nullable":true},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Publishing Route is enabled or not</para>"},"referenceType":{"$ref":"#/components/schemas/RoutingType"},"referenceId":{"type":"integer","description":"<para type=\"description\">Reference ID of the Publishing Route</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Publishing Preferred Route</para>\r\n<para type=\"description\"></para>"},"RoutingType":{"enum":[["3 = Gateway","51 = HALB","83 = Custom"]],"type":"string","description":"<para type=\"synopsis\">RAS Publishing Routing Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"PubItemFilter":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/PubItemRule"},"nullable":true},"default":{"$ref":"#/components/schemas/DefaultAssignmentType"}},"additionalProperties":false,"description":"<para type=\"synopsis\">The PubItem Filter object.</para>\r\n<para type=\"description\"></para>"},"PubItemRule":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"priority":{"type":"integer","description":"<para type=\"description\">Priority of the object.</para>","format":"int32"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Rule is enabled or not</para>"},"name":{"type":"string","description":"<para type=\"description\">Name of the Rule</para>","nullable":true},"description":{"type":"string","description":"<para type=\"description\">Description of the Rule</para>","nullable":true},"criteria":{"$ref":"#/components/schemas/PubItemCriteria"}},"additionalProperties":false,"description":"<para type=\"synopsis\">PubItem Rule</para>\r\n<para type=\"description\"></para>"},"PubItemCriteria":{"type":"object","properties":{"securityPrincipals":{"$ref":"#/components/schemas/SecurityPrincipalsCriteria"},"gateways":{"$ref":"#/components/schemas/GatewaysCriteria"},"oSs":{"$ref":"#/components/schemas/OSsCriteria"},"iPs":{"$ref":"#/components/schemas/IPsCriteria"},"hardwareIDs":{"$ref":"#/components/schemas/HardwareIDsCriteria"},"access":{"$ref":"#/components/schemas/AccessType"},"devices":{"$ref":"#/components/schemas/DevicesCriteria"},"themes":{"$ref":"#/components/schemas/ThemesCriteria"}},"additionalProperties":false,"description":"<para type=\"synopsis\">PubItem Criteria</para>\r\n<para type=\"description\"></para>"},"SecurityPrincipalsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Security Principals Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/SecurityPrincipalCriteriaEntry"},"description":"<para type=\"description\">User criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Security Principals Criteria</para>\r\n<para type=\"description\"></para>"},"MatchingModeType":{"enum":[["0 = IsNotOneOfTheFollowing","1 = IsOneOfTheFollowing"]],"type":"string","description":"<para type=\"synopsis\">Matching mode type options</para>\r\n<para type=\"description\"></para>","format":"int32"},"SecurityPrincipalCriteriaEntry":{"type":"object","properties":{"account":{"type":"string","description":"<para type=\"description\">The name of the user/group account the filter is added to.</para>","nullable":true},"type":{"$ref":"#/components/schemas/UserType"},"sid":{"type":"string","description":"<para type=\"description\">The SID of the user/group account the filter is added to.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Security Principal Criteria Entry</para>\r\n<para type=\"description\"></para>"},"UserType":{"enum":[["1 = User","2 = Group","3 = ForeignSecurityPrincipal","4 = Computer"]],"type":"string","description":"<para type=\"synopsis\">User Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"GatewaysCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Gateways Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/GatewayCriteriaEntry"},"description":"<para type=\"description\">Gateway criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Gateways Criteria</para>\r\n<para type=\"description\"></para>"},"GatewayCriteriaEntry":{"type":"object","properties":{"gatewayIP":{"type":"string","description":"<para type=\"description\">The gateway IP.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Gateway criteria entry</para>\r\n<para type=\"description\"></para>"},"OSsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the OSs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"allowedOSes":{"$ref":"#/components/schemas/AllowedOperatingSystems"}},"additionalProperties":false,"description":"<para type=\"synopsis\">OS Criteria Settings</para>\r\n<para type=\"description\"></para>"},"AllowedOperatingSystems":{"type":"object","properties":{"chrome":{"type":"boolean","description":"<para type=\"description\">Whether Chrome is allowed or not.</para>"},"android":{"type":"boolean","description":"<para type=\"description\">Whether Android is allowed or not.</para>"},"webClient":{"type":"boolean","description":"<para type=\"description\">Whether Web Client is allowed or not.</para>"},"iOS":{"type":"boolean","description":"<para type=\"description\">Whether iOS is allowed or not.</para>"},"linux":{"type":"boolean","description":"<para type=\"description\">Whether Linux is allowed or not.</para>"},"mac":{"type":"boolean","description":"<para type=\"description\">Whether MAC OS is allowed or not.</para>"},"wyse":{"type":"boolean","description":"<para type=\"description\">Whether Wyse is allowed or not.</para>"},"windows":{"type":"boolean","description":"<para type=\"description\">Whether Windows is allowed or not.</para>"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Allowed Operating Systems</para>\r\n<para type=\"description\"></para>"},"IPsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the IPs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"allowedIPs":{"$ref":"#/components/schemas/AllowedIPsCriteria"}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPs Criteria</para>\r\n<para type=\"description\"></para>"},"AllowedIPsCriteria":{"type":"object","properties":{"iPv4s":{"type":"array","items":{"$ref":"#/components/schemas/IPv4CriteriaEntry"},"description":"<para type=\"description\">IPv4 criteria list</para>","nullable":true},"iPv6s":{"type":"array","items":{"$ref":"#/components/schemas/IPv6CriteriaEntry"},"description":"<para type=\"description\">IPv6 criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Allowed IPs Criteria</para>\r\n<para type=\"description\"></para>"},"IPv4CriteriaEntry":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPv4 Criteria Entry</para>\r\n<para type=\"description\"></para>"},"IPv6CriteriaEntry":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPv6 Criteria Entry</para>\r\n<para type=\"description\"></para>"},"HardwareIDsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Hardware IDs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/HardwareIDCriteriaEntry"},"description":"<para type=\"description\">Hardware IDs criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Hardware IDs Criteria</para>\r\n<para type=\"description\"></para>"},"HardwareIDCriteriaEntry":{"type":"object","properties":{"hardwareID":{"type":"string","description":"<para type=\"description\">The hardware ID.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Hardware ID criteria entry</para>\r\n<para type=\"description\"></para>"},"AccessType":{"enum":[["0 = DenyCriteriaWhen","1 = AllowCriteriaWhen"]],"type":"string","description":"<para type=\"synopsis\">Access type options</para>\r\n<para type=\"description\"></para>","format":"int32"},"DevicesCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Devices Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClientDeviceCriteriaEntry"},"description":"<para type=\"description\">Client criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Devices Criteria</para>\r\n<para type=\"description\"></para>"},"ClientDeviceCriteriaEntry":{"type":"object","properties":{"client":{"type":"string","description":"<para type=\"description\">The name of the client device.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Client device criteria entry</para>\r\n<para type=\"description\"></para>"},"ThemesCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Themes Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"<para type=\"description\">Theme criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Themes Criteria</para>\r\n<para type=\"description\"></para>"},"DefaultAssignmentType":{"enum":[["0 = Deny","1 = Allow"]],"type":"string","description":"<para type=\"synopsis\">Default assignment type options</para>\r\n<para type=\"description\"></para>","format":"int32"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-rest-api-guide/api-reference/publishing/copy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
