Load plant - Intergraph Smart Engineering Manager - Help - Intergraph

Intergraph Smart Engineering Manager Smart API Help (Version 2)

PPMProduct
Intergraph Smart Engineering Manager
PPMCategory_custom
Help
Version_WebSEM
2.0

This request allows you to load a plant into a chosen site.

  • Only plant packages created using the Smart API Copy plant request can be loaded. You cannot load a plant that was copied using the Desktop version of Smart Engineering Manager.

  • If the site into which you want to load the plant does not appear in the results when you run the request View sites, run the Import site request first.

Use the POST method to load a plant with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v2

  • Resource path: Sites('<Site Name>')/Com.Ingr.Sem.v2.LoadPlant/

Resource path strings are case-sensitive.

Sample URI

POST

https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v2/Sites('WebAPISite_01')/Com.Ingr.Sem.v2.LoadPlant/

Sample JSON request

You specify the parameters for the plant and associated applications to be loaded in the body of the request.

  • The plant parameters must match the platform (Oracle or SQL Server) that the site into which you are going to load the plant was created on.

  • Plant names must be unique in the database.

  • Backslashes used in paths must be doubled as shown below.

  • The example shown below is for a plant with two associated applications where both applications are required in the copied plant. When loading a plant, ensure that applications not associated with the plant are excluded from the request.

  • Parameters and values shown in italics are specific to SQL Server or Oracle only. For details, see under 'Description and Comments' in the table below.

  • Oracle database usernames are not allowed to contain spaces and the following characters: " . < , > ? \ / ' ; { } [ ] ~ ` ! % * ( ) & $ @ # - + ^ = |

  • Oracle database passwords are not allowed to contain spaces and the following characters: ' $ @ "

  • SQL Server database usernames cannot begin with a number, nor are they allowed to contain spaces and the following characters: " . < , > ? \ / ' ; { } [ ] ~ ` ! % * ( ) & $ @ #

  • SQL Server database passwords are not allowed to contain spaces and the following character: '

  • The database user names and passwords shown in the example are recommended values based on the name of your plant. For more information, see Assigning Database User Names.

{

"packageName": "Copy_of_WebAPIPlant01.zip",

"changeGuid": true,

"plant":

{

"Id": "WebAPIPlant02",

"Name": "WebAPIPlant02",

"Description": "Description of plant WebAPIPlant02",

"PlantStructurePath": "\\\\VSORA12SEM\\AppOra12\\API_Sites\\WebAPISite01\\Plants\\WebAPIPlant02",

"PlantBackupLocationPath": "\\\\VSORA12SEM\\AppOra12\\API_Sites\\WebAPISite01\\Plants\\Backups",

"DatabaseServer": "SEM12DEV",

"SystemUser": "system","SystemPassword": "Oracle12",

"DatabaseName": "PlantAPI02",

"SchemaUserName": "WebAPIPlant02","SchemaPassword": "WebAPIPlant02",

"DataDictUserName": "WebAPIPlant02d","DataDictPassword": "WebAPIPlant02d",

"SchemaTablespace": "USERS","SchemaTempTablespace": "TEMP",

"DataDictTablespace": "USERS","DataDictTempTablespace": "TEMP"

},

"applications":

[

{

"ApplicationType": "Sppid",

"DatabaseName": "PlantAPI02",

"SchemaUserName": "WebAPIPlant02pid","SchemaPassword": "WebAPIPlant02pid",

"DataDictUserName": "WebAPIPlant02pidd","DataDictPassword": "WebAPIPlant02pidd",

"SchemaTablespace": "USERS","SchemaTempTablespace": "TEMP",

"DataDictTablespace": "USERS","DataDictTempTablespace": "TEMP",

"ReferenceDataPath": "\\\\VSORA12SEM\\AppOra12\\API_Sites\\WebAPISite01\\Reference Data\\P&ID Reference Data"

},

{

"ApplicationType": "Spel",

"DatabaseName": "PlantAPI02",

"SchemaUserName": "WebAPIPlant02el","SchemaPassword": "WebAPIPlant02el",

"DataDictUserName": "WebAPIPlant02eld","DataDictPassword": "WebAPIPlant02eld",

"RefSchemaUserName": "WebAPIPlant02elref","RefSchemaPassword": "WebAPIPlant02elref",

"SchemaTablespace": "USERS","SchemaTempTablespace": "TEMP",

"DataDictTablespace": "USERS","DataDictTempTablespace": "TEMP",

"RefSchemaTablespace": "USERS","RefSchemaTempTablespace": "TEMP",

"ReferenceDataPath": "\\\\VSORA12SEM\\AppOra12\\API_Sites\\WebAPISite01\\Reference Data\\SEL Reference Data"

}

]

}

JSON request parameters

Parameter

Value

Description and Comments

packageName

Name of the .zip file for the plant to be loaded

changeGuid

true / false

A value of 'true' creates new identifiers when copying the plant. A value of 'false' retains the existing identifiers from the copied plant - this option is useful when working in an integrated environment when loading a plant with externally-modified data without the need to re-correlate the items when publishing to SmartPlant Foundation.

plant

Section under which plant parameters are specified

Id / Name

<Plant Name>

The name the plant will have after loading. The Id and Name parameters must have the same value, and this value must be unique in the database.

Description

Optional field

Type any text string or set value to 'null'

PlantStructurePath

<path for plant structure location>

PlantBackupLocationPath

<path for plant backup file location>

DatabaseServer

<Server Name>

For SQL Server, can be the server on which the site .ini file is located, if required

SystemUser

For SQL Server, the case-sensitivity of this value depends on how the DBA defines it for the database

SystemPassword

DatabaseName

Parameter applies to SQL Server only. Database must be defined and available. Can have same name as plant.

SchemaUserName

Can have same name as plant

SchemaPassword

Can have same name as plant

DataDictUserName

Can use name of plant+'d'

DataDictPassword

Can use name of plant+'d'

SchemaTablespace

USERS

Parameter applies to Oracle only. Value shown is default.

SchemaTempTablespace

TEMP

Parameter applies to Oracle only while loading the plant. Value shown is default.

DataDictTablespace

USERS

Parameter applies to Oracle only. Value shown is default.

DataDictTempTablespace

TEMP

Parameter applies to Oracle only while loading the plant. Value shown is default.

applications

Section under which application parameters are specified

ApplicationType

Sppid (for Smart P&ID)

Spel (for Smart Electrical)

Specify the applications you want to include when loading the plant. Delete the section for each application you do not want to include.

ReferenceDataPath

The path to your application's reference data

For details of the rest of the application JSON request parameters, see the list of parameters and their values for the appropriate applications and database platform under Associate application.

What do you want to do next?

Related topics

Create plant

View plants

Delete plant