This request allows you to copy an existing plant. The output is a zip file package that is saved in the site backup folder.
-
All database items are copied with the plant. This includes items such as EDE custom layouts.
-
When copying a plant that is associated with Smart P&ID, display sets are included among the copied items; however, only filters that belong to both the original and the copied plant appear in the display sets.
-
The following plant items are not copied:
-
Projects and Workshare, where enabled in the plant.
-
All integration settings and items such as registry information and To Do List tasks.
-
EDE saved (custom) views.
-
All Options Manager settings related to PDS, Smart 3D, and Smart Reference Data (values are blank in the copied plant).
-
For an ABE related item, the Smart P&ID Source Tag property.
-
Use the POST method to copy a plant with the following input:
-
Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v3
-
Resource path: /Sites('<Site Name>')/Plants('<Plant Name>')/Com.Ingr.Sem.V2.Copy/
-
Resource path strings are case-sensitive.
-
The backslash at the end of the resource path is mandatory.
Sample URI
POST
https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v3/Sites('WebAPISite01')/Plants('WebAPIPlant01')/Com.Ingr.Sem.V2.Copy/
The package file name with the folder path is displayed in the results when the request
is successful.
Sample JSON request
-
Backslashes used in paths must be doubled as shown below.
-
The example shown below is for a plant with all three applications associated and where all the applications are required in the copied plant. When copying your plant, ensure that applications not associated with the plant are excluded from the request.
{
"packageFileName": "Copyof_WebAPIPlant01",
"applications":
[
{
"ApplicationType": "Sppid",
"SaveRevisions": true,
"SaveVersions": true
},
{
"ApplicationType": "Spel",
"SaveRevisions": true
}
]
}
JSON request parameters
Parameter |
Value |
Description and Comments |
---|---|---|
packageFileName |
<Package name> |
|
ApplicationType |
Sppid (for Smart P&ID) Spel (for Smart Electrical) |
Specify the applications you want to include when copying the plant. Delete the section for each application you do not want to include. |
SaveRevisions |
true / false |
Set to 'true' to save revisions when copying the plant |
SaveVersions |
true / false |
Set to 'true' to save drawing versions when copying the plant (Smart P&ID only) |
Sample JSON response
The 'PackageFileName' parameter in the response includes the site backup folder path.
{
"@odata.context": "https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v3/$metadata#Com.Ingr.Sem.V2.CopyResult",
"PackageFileName": "\\\\VSORA12SEM\\AppOra12\\API_Sites\\WebAPISite01\\Backups\\Copy_of_WebAPIPlant01.zip"
}