Synchronize a plant with a package - Intergraph Smart Engineering Manager - 3.0 - Customization & Programming - Hexagon

Intergraph Smart Engineering Manager Web API Help

Language
English
Product
Intergraph Smart Engineering Manager
Subproduct
Web API
Search by Category
Customization & Programming
Smart Engineering Manager Web Version
3.0

This request allows you to synchronize reference data between a plant and a package.

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:

    1. Run the Compare a plant with a package request.

      If there were differences between the source and target, the response window will display results such as the following:

    2. In the JSON response, collapse the ApplicationLevel and PlantLevel sections for easier manipulation:

    3. Select the part of the JSON response for the request parameters as shown:

    4. 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(‘Sppid’)/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": "\\\\sem-sites\\WebAPI_Sites\\WebAPISite02\\Plants\\Backups\\PIDPackageof_WebAPIPlant01.zip",

"isSourcePackage": true

}

JSON request parameters

Parameter

Value

Description and Comments

compareResult

Parameters for:

ApplicationLevel
PlantLevel
ReportUrl
ErrorReportUrl

Optional. The parameters and their values are copied from the results of the Compare a plant with a package request (see Notes above).

sourceSiteName

<Name of source site>

sourcePlantOrPackageName

<Package name>

Name of package from available packages in the source site

issourcePackage

true

Value 'true' is required when synchronizing a plant with a package