Create Environment Web Service

This web service creates a RapidDeploy environment on the framework server.

Example request

PUT http://localhost:8090/MidVision/ws/environment/create HTTP/1.1
Accept-Encoding: gzip,deflate
Authorization: ********************
Content-Type: application/xml
Content-Length: 4935
Host: localhost:8090
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

   <environment>
      <envType live="false" name="Development"/>
      <envTypeName>Development</envTypeName>
      <environmentEnabled>true</environmentEnabled>
      <hostname>localhost_linux</hostname>
      <name>dev</name>
      <owner>mvadmin</owner>
      <pluginDataSet>
         <pluginData><![CDATA[<?xml version="1.0" encoding="UTF-8"?><projectPlugins><projectPlugins><active>true</active><data><name>ScriptsEnvironment</name><displayName>Generic Scripts</displayName><version>4.0.0</version><description>Scripts environment.&lt;br/&gt;
                        Use this plugin to specify scripts target environments.&lt;br/&gt;
        </description><fields><headerTitle>Generic Scripts</headerTitle><fieldKey>installationPath</fieldKey><fieldValue>/scripts/location</fieldValue><label>Install Path</label><type>TEXT</type><mandatory>true</mandatory><helpText>The top level directory of the scripts installation. The ANT fileset patterns will
                be used to select files recursively below this directory to include in a snapshot. For control operations,
                the relevant scripts will be sourced relative to this path.</helpText><toolTipText>The top level directory of the scripts installation.
                </toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>snapshotDirectory</fieldKey><fieldValue>/Users/richardbettison/RMB/midvision/rapiddeploy-35/snapshots/scripts</fieldValue><label>Snapshot Directory</label><type>TEXT</type><mandatory>true</mandatory><helpText>The directory location on the MidVision server where snapshots of this environment should be stored.</helpText><toolTipText>The snapshot files directory location.</toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>configFilesetIncludes</fieldKey><fieldValue>**/*.sh,**/*.ksh,**/*.pl,**/*.bat,**/*.cmd</fieldValue><label>Config fileset includes</label><type>TEXT</type><mandatory>true</mandatory><helpText>ANT based fileset patterns to include in a snapshot. These files will be copied
                back to the RapidDeploy server and stored in the snapshot.</helpText><toolTipText>ANT based fileset patterns to include in a snapshot.
                </toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>configFilesetExcludes</fieldKey><fieldValue>**/tmpworklog*.log, **/*.jar, **/*.war, **/*.rar</fieldValue><label>Config fileset excludes</label><type>TEXT</type><mandatory>true</mandatory><helpText>ANT based fileset patterns to exclude in a snapshot.</helpText><toolTipText>ANT based fileset patterns to exclude in a snapshot.</toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>binaryFilesetIncludes</fieldKey><fieldValue/><label>Binary fileset includes</label><type>TEXT</type><mandatory>false</mandatory><helpText>ANT based fileset patterns to include in a snapshot. These files will not be downloaded, but
                the current checksum of the files will be recorded in RapidDeploy, for later comparison.</helpText><toolTipText>ANT based fileset patterns to include in a snapshot.
                </toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>binaryFilesetExcludes</fieldKey><fieldValue>**/*</fieldValue><label>Binary fileset excludes</label><type>TEXT</type><mandatory>false</mandatory><helpText>ANT based fileset patterns to exclude in a snapshot.</helpText><toolTipText>ANT based fileset patterns to exclude in a snapshot.</toolTipText><style>width: 50em;</style><classType>java.lang.String</classType></fields><fields><headerTitle>Snapshot Settings</headerTitle><fieldKey>downloadBinaries</fieldKey><fieldValue>false</fieldValue><label>Download binaries</label><listOfChoices>true,false</listOfChoices><type>CHECKONE</type><mandatory>false</mandatory><helpText>When set to true, the binaries selected for in the Binary Fileset Includes
                field will be downloaded as part of the snapshot, instead of just the checksum being taken.</helpText><toolTipText>Download binaries in the snapshot.</toolTipText><style/><classType>java.lang.Boolean</classType></fields><panelTitle>Generic Scripts</panelTitle></data><pluginName>Scripts Management (v4.1.0)</pluginName><pluginType>environment</pluginType><pluginVersion>4.1.0</pluginVersion></projectPlugins></projectPlugins>]]></pluginData>
      </pluginDataSet>
      <serverDisplayName>localhost_linux</serverDisplayName>
      <snapshotsPath>C:/midvision_4.0/snapshots</snapshotsPath>
      <validated>0</validated>
   </environment>

Example Response

<html>
   <head>
      <meta content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org" name="generator"/>
      <title>createEnvironment</title>
      <link type="text/css" rel="stylesheet" href="http://localhost:8090/MidVision/ui/javax.faces.resource/components.css?ln=primefaces"/>
   </head>
   <body>
      <div>
         <div style="border-bottom: 0.1em solid black; display: block; height: 30px; margin-bottom: 1em; margin-top: 0.5em; position: relative; width: 100%;">
            <h2>createEnvironment</h2>
         </div>
         <div aria-live="polite" class="ui-messages ui-widget">
            <div class="ui-messages-info ui-corner-all">
               <ul>
                  <li>
                     <span class="ui-messages-info-summary">Create Environment</span>
                     <br/>
                     <span class="ui-messages-info-detail">SUCCESS: The target environment [localhost_linux.dev] has been created.</span>
                  </li>
               </ul>
            </div>
         </div>
      </div>
   </body>
</html>