This request allows you to synchronize reference data between two plants in the same site or from different sites.
Use the POST method to synchronize the reference data with the following input:
-
Service Root URI: https://<Server Name>/<IIS Application Name>/sem/V2
-
Resource path: /Sites('<Site Name>')/Plants('<Plant Name>')/Applications(‘<Application Type>’)/Com.Ingr.Sem.V2.Sync/
-
Resource path strings are case-sensitive.
-
The backslash at the end of the resource path is mandatory.
-
You must specify one of the following as the application type:
-
Spel (for Smart Electrical)
-
Sppid (for Smart P&ID)
-
-
The compareResult parameter in the JSON request is optional. If you choose not to include this parameter, running the request will sync the entire plant and application level data. If you include the parameter, running the request will sync only the items for which differences were found in the comparison. To run this request with the compareResult parameter, you must first do the following:
-
Run the Compare plants request.
If there were differences between the source and target, the response window will display results such as the following:
-
In the JSON response, collapse the ApplicationLevel and PlantLevel sections for easier manipulation:
-
Select the part of the JSON response for the request parameters as shown:
-
Copy the selected content and paste it under the compareResult parameter, as shown in the sample JSON request below.
-
Sample URI
POST
https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v3/Sites('WebAPISite02')/Plants('WebAPIPlant02')/Applications(‘Spel’)/Com.Ingr.Sem.V2.Sync/
Sample JSON request
{
"compareResult":{
"ApplicationLevel": <results>,
"PlantLevel": <results>,
"ReportUrl": "https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v3/ReportVault/5248608289345875652.html",
"ErrorReportUrl": "https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v3/ReportVault/5248608289346500526.html"
},
"sourceSiteName": "WebAPISite02",
"sourcePlantOrPackageName": "WebAPI_SourceSyncPlant",
"isSourcePackage": false
}
JSON request parameters
Parameter |
Value |
Description and Comments |
---|---|---|
compareResult |
Parameters for: ApplicationLevel |
Optional. The parameters and their values are copied from the results of the Compare plants request (see Notes above). |
sourceSiteName |
<Name of source site> |
|
sourcePlantOrPackageName |
<Name of source plant> |
|
issourcePackage |
false |
Value 'false' is required when synchronizing plants |