This request allows you to create a plant in a chosen site.
If the site in which you want to create 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 create a plant with the following input:
-
Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v4
-
Resource path: /Sites('<Site Name>')/Plants
Resource path strings are case-sensitive.
Sample URI
POST
https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/v4/Sites('WebAPISite01')/Plants
Sample JSON request
You specify the parameters for your new plant in the body of the request.
-
The plant parameters must match the platform (Oracle or SQL Server) on which the parent site was created.
-
Plant names must be unique in the database.
-
Backslashes used in paths must be doubled as shown below.
-
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.
-
Database usernames cannot contain spaces and the following characters: . < , > ? \ / ' ; { } [ ] ~ ` ! % * ( ) & $ @ # " - + ^ = | In addition, SQL Server database usernames are not allowed to begin with a number.
-
Oracle database passwords are not allowed to contain spaces or the following characters: ' $ @ "
-
SQL Server database passwords are not allowed to contain spaces or the character: '
-
The database usernames and passwords shown in the example are recommended values based on the name of your site. For more information, see Assigning Database User Names.
{
"IsCustomTemplate": false,
"CustomTemplatePath": null,
"Name": "WebAPIPlant01",
"Description": "Description of plant",
"HierarchyName": "Hierarchy 7",
"PlantStructurePath": "\\\\sem-sites\\WebAPI_Sites\\WebAPISite01\\Plants\\WebAPIPlant01",
"PlantBackupLocationPath": "\\\\sem-sites\\WebAPI_Sites\\WebAPISite01\\Plants\\Backups",
SQL Server parameters
A database with the DatabaseName value for the plant must be created manually before running the request.
"DatabaseServer": "SemserverMSS",
"SystemUser": "SysUser","SystemPassword": "<Password>",
"DatabaseName": "WebAPIPlant01",
"SchemaUserName": "WebAPIPlant01","SchemaPassword": "WebAPIPlant01",
"DataDictUserName": "WebAPIPlant01d","DataDictPassword": "WebAPIPlant01d"
}
Oracle parameters
"DatabaseServer": "SemserverORA",
"SystemUser": "SysUser","SystemPassword": "<Password>",
"DatabaseName": "WebAPIPlant01",
"SchemaUserName": "WebAPIPlant01","SchemaPassword": "WebAPIPlant01",
"DataDictUserName": "WebAPIPlant01d","DataDictPassword": "WebAPIPlant01d",
"SchemaTablespace": "USERS","SchemaTempTablespace": "TEMP",
"DataDictTablespace": "USERS","DataDictTempTablespace": "TEMP"
}
JSON request parameters
Parameter |
Value |
Database Type |
Description and Comments |
---|---|---|---|
IsCustomTemplate |
true / false |
||
CustomTemplatePath |
<file path of custom template> |
Only applies where "IsCustomTemplate" value is 'true'; otherwise, set value to 'null'. |
|
Name |
<Plant Name> |
Must have a unique value in the database. |
|
Description |
Optional field |
Type any text string or set value to 'null'. |
|
HierarchyName |
Hierarchy 1, Hierarchy 2, ... Hierarchy 7 |
Can specify custom hierarchy, if created. |
|
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 |
SQL Server |
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 |
Oracle |
Value shown is default. |
SchemaTempTablespace |
TEMP |
Oracle |
Value shown is default. |
DataDictTablespace |
USERS |
Oracle |
Value shown is default. |
DataDictTempTablespace |
TEMP |
Oracle |
Value shown is default. |
What do you want to do next?