<document>
  <header>
    <product>resin</product>
    <title>REST Resin Administration</title>
    <type>contents</type>
    <description>
      <p>Starting with version 4.0.26 Resin provides REST interface. Simple and
        secure, it can be used for integration with services such as RightScale®
        and others.
      </p>
    </description>
  </header>
  <body>
    <localtoc/>

    <s1 title="Overview">
      <p>
      REST interface is provided for convenience of integration with
      administration and monitoring tools that are capable of using
      REST as integration protocol. Resin's set of REST actions covers
      functionality available via CLI and adds an extra action that allows
      retrieving Resin statistics data.
      </p>
      <p>
        By default Resin REST is disabled. Default configuration also requires
        secure protocol.
      </p>
      <p>REST actions, available via the interface, are required to be invoked
        with either GET or POST methods. Depending on the effect on the server
        the proper HTTP method is required: actions change state of the Resin's
        internal objects require POST method. Other actions must use GET.
      </p>
    </s1>
    <s1 title="enabling the interface">

      <p>By default the interface is disabled. Un-commenting line
        <code>rest_admin_enable : true</code>
        in resin properties enables the REST service.
      </p>
      <p>By default, the connection is required to be made over a secure
        protocol(HTTPS). Relaxing the secure constraint can be done with setting
        <code>rest_admin_secure</code>
        to<code>true</code>.
      </p>


      <example title="Example: enabling Resin Secure REST interface">
        # Enable Resin REST Admin
        rest_admin_enable : true

        # Require SSL for REST Admin
        rest_admin_secure : true
      </example>

      <p>Resin REST Servlet is registered in
        <code>cluster-default.xml</code>
        file (see excerpt below for a reference).
      </p>

      <example title="Reference: registered REST Servlet">
        &lt;resin:if test="${rest_admin_enable}">
          &lt;web-app id="/resin-rest"
                      root-directory="${resin.root}/doc/resin-rest">

            &lt;resin:BasicLogin realm-name="resin"/>

            &lt;resin:Allow url-pattern="/*">
              &lt;resin:IfUserInRole role="resin-admin"/>
            &lt;/resin:Allow>

            &lt;servlet-mapping url-pattern="/*"
                                servlet-class="com.caucho.admin.servlet.AdminRestServlet">
              &lt;init>
                &lt;require-secure>${rest_admin_secure}&lt;/require-secure>
              &lt;/init>
            &lt;/servlet-mapping>
          &lt;/web-app>
        &lt;/resin:if>
      </example>

      <p>The registration can be augmented further with
        <code>resin:IfNetwork</code>
        constraint to limit access to specific IPs only. Adding the constraint
        must be considered when enabling access over HTTP.
      </p>

    </s1>

    <s1 title="invoking REST action">
      <p>Invoking REST action requires constructing an HTTP request with proper
        url and body. REST action is encoded in the URL. Base of the URL is the
        address of the Resin server itself combined with the context name of the
        Resin REST web-app. The defaut URL is
        <code>http://localhost:8080/resin-rest</code>. Concatenating the URL
        with action name creates a complete Resin REST service URL. e.g.
        <code>http://localhost:8080/resin-rest/jmx-list</code>
      </p>

      <example title="Example: invoking Resin REST jmx-list action">
        ~$curl --user admin:secret http://localhost:8080/resin-rest/jmx-list
      </example>
    </s1>

    <s1 title="interpreting Resin REST Service results">
      <p>Resin REST replies with JSON Objects encoded as a String. Since
        integration requires interchangeable data format JSON, with the
        multitudes of available parsers in various languages, is a proper
        choice. The output below has been post-formatted and shortened for easy
        reading.
      </p>

      <example title="Example: invoking Resin REST jmx-list action">
        ~$curl --user admin:secret
        'http://localhost:8080/resin-rest/jmx-list?pattern=resin:type=Resin&amp;print-values=true'

        [
          {
            "attributes":[
              ...
              {
                "name":"ConfigFile",
                "value":"/Volumes/projects/caucho/trunk/resin/conf/resin.xml"
              },
              {
                "name":"LogDirectory",
                "value":"/Volumes/projects/caucho/trunk/resin/log"
              },
              {
                "name":"ResinHome",
                "value":"/Volumes/projects/caucho/trunk/resin/"
              },
              {
                "name":"RootDirectory",
                "value":"/Volumes/projects/caucho/trunk/resin/"
              }
            ],
           "name":"resin:type=Resin"
          }
          ...
        ]

      </example>
    </s1>
    <!---->
    <s1 title="available REST actions">
      <deftable title="REST actions">
        <tr>
          <th>Action</th>
          <th>Http method</th>
          <th>Description</th>
        </tr>
        <tr>
          <td>config-cat</td>
          <td>GET</td>
          <td>prints configuration file deployed with
            <code>config-deploy</code>
            action or command
          </td>
        </tr>
        <tr>
          <td>config-deploy</td>
          <td>POST</td>
          <td>deploys configuration</td>
        </tr>
        <tr>
          <td>config-ls</td>
          <td>lists files deployed via
            <code>config-deploy</code>
            command or action
          </td>
        </tr>
        <tr>
          <td>config-undeploy</td>
          <td>POST</td>
          <td>Un-deploys configuration deployed with config-deploy action</td>
        </tr>
        <tr>
          <td>deploy-copy</td>
          <td>POST</td>
          <td>copies an application from one context to another</td>
        </tr>
        <tr>
          <td>deploy-list</td>
          <td>GET</td>
          <td>lists all applications deployed on a server</td>
        </tr>
        <tr>
          <td>jmx-call</td>
          <td>POST</td>
          <td>calls MBean's method</td>
        </tr>
        <tr>
          <td>jmx-dump</td>
          <td>GET</td>
          <td>dump all MBean attributes and values</td>
        </tr>
        <tr>
          <td>jmx-list</td>
          <td>GET</td>
          <td>lists MBeans, attributes and operations</td>
        </tr>
        <tr>
          <td>jmx-set</td>
          <td>POST</td>
          <td>sets value of a jmx attribute</td>
        </tr>
        <tr>
          <td>license-add</td>
          <td>POST</td>
          <td>adds a license file</td>
        </tr>
        <tr>
          <td>list-restarts</td>
          <td>GET</td>
          <td>lists Resin server restarts</td>
        </tr>
        <tr>
          <td>log-level</td>
          <td>POST</td>
          <td>configures log level for one or more loggers</td>
        </tr>
        <tr>
          <td>pdf-report</td>
          <td>GET</td>
          <td>produces and returns pdf-report</td>
        </tr>
        <tr>
          <td>stats</td>
          <td>GET</td>
          <td>prints stats collected by Resin</td>
        </tr>
        <tr>
          <td>thread-dump</td>
          <td>GET</td>
          <td>produces a thread dump</td>
        </tr>
        <tr>
          <td>user-add</td>
          <td>POST</td>
          <td>adds an user with Resin administrator privileges</td>
        </tr>
        <tr>
          <td>user-list</td>
          <td>GET</td>
          <td>lists users with Resin administrator privileges</td>
        </tr>
        <tr>
          <td>user-remove</td>
          <td>POST</td>
          <td>removes user added with
            <code>user-add</code>
            command or action
          </td>
        </tr>
        <tr>
          <td>web-app-deploy</td>
          <td>POST</td>
          <td>deploys an application to Resin</td>
        </tr>
        <tr>
          <td>web-app-restart</td>
          <td>POST</td>
          <td>restarts deployed application</td>
        </tr>
        <tr>
          <td>web-app-start</td>
          <td>POST</td>
          <td>starts deployed application</td>
        </tr>
        <tr>
          <td>web-app-stop</td>
          <td>POST</td>
          <td>stops deployed application</td>
        </tr>
        <tr>
          <td>web-app-undeploy</td>
          <td>POST</td>
          <td>undeploys an application deployed with
            <code>web-app-deploy</code>
            command
          </td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="config-deploy">
      <p>Command config-deploy deploys a configuration archive from an input
        stream to Resin cluster. Config-deploy action works with Resin's import
      tag, which imports from a <code>cloud:/resin-inf/*.xml</code> with
      default configuration (resin.xml)</p>
      <pre><code>
          &amp;resin:import fileset="cloud:/resin-inf/*.xml" recover="true"/>
      </code></pre>
      <p>Action expects the configuration to be streamed in the POST request body.</p>
      <example>
        curl -H "Content-Type: " --user admin:secret --data-binary @/tmp/my-conf.jar 'http://localhost:8080/resin-rest/config-deploy'
      </example>
      <note>A value other than "application/x-www-form-urlencoded" must be
        specified as a value for Content-Type header.</note>
      <deftable title="config-deploy options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to deploy to</td>
          <td></td>
        </tr>
        <tr>
          <td>stage</td>
          <td>stage of the server's deployment</td>
          <td>production</td>
        </tr>
        <tr>
          <td>version</td>
          <td>version e.g.(1.0.0)</td>
          <td></td>
        </tr>
        <tr>
          <td>message</td>
          <td>commit message</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="config-cat">
      <p>Similar to a unix 'cat' command config-cat prints content of a
        configuration file deployed to Resin using config-deploy action.</p>
      <deftable title="config-cat options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>Defaults to current server</td>
        </tr>
        <tr>
          <td>name</td>
          <td>full name of the configuration file inside the deployed
            configuration archive
          </td>
          <td>required</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>stage of the server's deployement</td>
          <td>Defaults to 'production'</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="config-ls">
      <p>Action config-ls lists files deployed with config-deploy action.</p>
      <deftable title="config-ls options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>Defaults to the current server</td>
        </tr>
        <tr>
          <td>name</td>
          <td>name of the file or directory</td>
          <td></td>
        </tr>
        <tr>
          <td>stage</td>
          <td>stage of the server's deployment</td>
          <td>production</td>
        </tr>
        <tr>
          <td>version</td>
          <td>version e.g.(1.0.0)</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="config-undeploy">
      <p>Action config-undeploy un-deploys configuration deployed with
        config-deploy action.</p>
      <deftable title="config-undeploy options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to query</td>
          <td></td>
        </tr>
        <tr>
          <td>stage</td>
          <td>stage of the server's deployment</td>
          <td>production</td>
        </tr>
        <tr>
          <td>version</td>
          <td>version e.g.(1.0.0)</td>
          <td></td>
        </tr>
        <tr>
          <td>message</td>
          <td>commit message</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="jmx-list">
      <p>Action jmx-list lists MBeans with (optionally) attributes and values.</p>
      <deftable title="jmx-list options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>Defaults to the current server</td>
        </tr>
        <tr>
          <td>pattern</td>
          <td>pattern used to query the MBeanServer e.g. java.lang:*</td>
          <td>resin:*</td>
        </tr>
        <tr>
          <td>print-attributes</td>
          <td>prints attributes</td>
          <td>false</td>
        </tr>
        <tr>
          <td>print-values</td>
          <td>prints values (overrides print-attributes)</td>
          <td>false</td>
        </tr>
        <tr>
          <td>print-operations</td>
          <td>prints operations</td>
          <td>false</td>
        </tr>
        <tr>
          <td>print-all-beans</td>
          <td>matches all MBeans</td>
          <td>false</td>
        </tr>
        <tr>
          <td>print-platform-beans</td>
          <td>matches only java.lang:* MBeans</td>
          <td>false</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="jmx-call">
      <p>Action jmx-call invokes an action on an MBean.</p>
      <deftable title="jmx-call options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>Defaults to the current server</td>
        </tr>
        <tr>
          <td>pattern</td>
          <td>JMX ObjectName pattern used to uniquely identify an MBean</td>
          <td>required</td>
        </tr>
        <tr>
          <td>operation</td>
          <td>name of operation (method) to invoke</td>
          <td>required</td>
        </tr>
        <tr>
          <td>operation-index</td>
          <td>when multiple methods are named with the same name, help to choose
            the method to invoke
          </td>
          <td>0</td>
        </tr>
        <tr>
          <td>values</td>
          <td>space separated list of arguments</td>
          <td>required</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="jmx-dump">
      <p>Action jmx-dump produces a complete dump of JMX tree with attributes and values.</p>
      <deftable title="jmx-dump options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="jmx-set">
      <p>Action jmx-set sets a value on an JMX JBean's attribute.</p>
      <note>Attribute name must be Capitalized (e.g. Foo not foo)</note>
      <deftable title="jmx-set options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>pattern</td>
          <td>JMX ObjectName pattern that uniquely identifies an MBean</td>
          <td>required</td>
        </tr>
        <tr>
          <td>attribute</td>
          <td>name of the attribute</td>
          <td>required</td>
        </tr>
        <tr>
          <td>value</td>
          <td>new value for the attribute</td>
          <td>null</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="license-add">
      <p>Action license-add writes a license file into a remote Resin's license directory.</p>
      <note>The license file should be passed in the request body.</note>
      <deftable title="license-add options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>Defaults to the current server</td>
        </tr>
        <tr>
          <td>overwrite</td>
          <td>overwrites the file specified in 'to' if the file exists</td>
          <td>false</td>
        </tr>
        <tr>
          <td>to</td>
          <td>name of the file to write to</td>
          <td>required</td>
        </tr>
        <tr>
          <td>restart</td>
          <td>optionally restarts server after license is deployed</td>
          <td>false</td>
        </tr>
      </deftable>

      <example>
        curl -H "Content-Type: " --user admin:secret --data-binary @/tmp/my-conf.jar 'http://localhost:8080/resin-rest/config-deploy'
      </example>
      <note>A value other than "application/x-www-form-urlencoded" must be
        specified as a value for Content-Type header.</note>

    </s1>
    <!---->
    <s1 title="list-restarts">
      <p>Action list-restarts prints restarts since a start of specified
        period.
      </p>
      <deftable title="list-restarts options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>period</td>
          <td>lookback (from now) period. e.g. '7D'</td>
          <td>7 days (specifed as 7D)</td>
        </tr>
      </deftable>
      <example title="list server restarts">
        curl --user admin:secret
        'http://localhost:8080/resin-rest/list-restarts'
      </example>
    </s1>

    <!---->
    <s1 title="log-level">
      <p>Action log-level configures logging level for specified list of
        loggers.
      </p>
      <deftable title="log-level options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>loggers</td>
          <td>space separated list of loggers</td>
          <td>root logger ('') and 'com.caucho' logger</td>
        </tr>
        <tr>
          <td>level</td>
          <td>new logging level(all, finest, finer, fine, config, info, warning,
            severe, off )
          </td>
          <td>required</td>
        </tr>
        <tr>
          <td>active-time</td>
          <td>specifies period of time the new value will be active</td>
          <td>until next restart</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="pdf-report">
      <p>Action pdf-report creates a PDF report and optionally returns the PDF
        file with the Response.
      </p>
      <deftable title="pdf-report options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>required</td>
        </tr>
        <tr>
          <td>report</td>
          <td>base name for the report</td>
          <td>Snapshot</td>
        </tr>
        <tr>
          <td>period</td>
          <td>reporting period</td>
          <td>1 Day (1D)</td>
        </tr>
        <tr>
          <td>log-directory</td>
          <td>directory to write the report to on the server side</td>
          <td>Resin's log directory</td>
        </tr>
        <tr>
          <td>profile-time</td>
          <td>turns execution profiler on for a specified time e.g. 20s (20
            seconds)
          </td>
          <td></td>
        </tr>
        <tr>
          <td>sample-period</td>
          <td>specifies sampling rate e.g. 150ms</td>
          <td>100ms</td>
        </tr>
        <tr>
          <td>snapshot</td>
          <td>includes JMX, thread dump and memory analysis in the report</td>
          <td>false</td>
        </tr>
        <tr>
          <td>watchdog</td>
          <td>specifies period as the starting of the server</td>
          <td>false</td>
        </tr>
        <tr>
          <td>load-pdf</td>
          <td>Streams PDF Report file with the response</td>
          <td>false</td>
        </tr>
      </deftable>
      <example title="creating and loading pdf report">
        curl --user admin:secret
        'http://localhost:8080/resin-rest/pdf-report?snapshot=true&amp;load-pdf=true' > my-report.pdf
      </example>
    </s1>
    <!---->
    <s1 title="stats">
      <p>Action stats returns statistics that can be used for building graphs.
      The JSON formatting is compatible with jquery-flot graph solution()</p>
      <deftable title="stats options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr><td>server</td><td>server to query</td><td>required</td></tr>
        <tr><td>meters</td><td>comma separated list of meters e.g.(JVM|Memory|Heap Memory Used, )</td><td></td></tr>
        <tr><td>period</td><td>time span from now e.g. 2D (2 days)</td><td>7D</td></tr>
      </deftable>
      <example title="querying Memory statistics">
        <pre>
          <code>
            curl --user admin:secret  'http://localhost:8080/resin-rest/stats?meters=JVM|Memory|Heap%20Memory%20Used'
            [
              {
              "label":"00|JVM|Memory|Heap Memory Used",
              "data": [
                [1330983197106,0.0],
                [1330983257158,8.5000192E7],
                [1330983299997,8.5000192E7],
                [1330983359987,8.5000192E7],
                [1330983419984,8.5000192E7],
                [1330983479994,8.5000192E7],
                [1330983539986,8.5000192E7],
                [1330983599990,8.5000192E7],
                [1330983659998,8.5000192E7],
                [1330983719999,8.5000192E7],
                [1330983779994,8.5000192E7],
                [1330983839995,8.5000192E7],
                [1330983900012,8.5000192E7],
                [1330983959983,8.5000192E7],
                [1330984019988,8.5000192E7],
                [1330984079986,8.5000192E7],
                [1330984139984,8.5000192E7],
                [1330984199999,8.5000192E7],
                [1330984259992,8.5000192E7],
                [1330984319991,8.5000192E7],
                [1330984379991,8.5000192E7],
                [1330984439987,8.5000192E7],
                [1330984499994,8.5000192E7],
                [1330984559984,8.5000192E7],
                [1330984619996,8.5000192E7],
                [1330984679996,8.5000192E7],
                [1330984739988,8.5000192E7],
                [1330984799980,8.5000192E7],
                [1330984859999,8.5000192E7],
                [1330984919990,8.5000192E7],
                [1330984979992,1.07880448E8]
              ]
              }
            ]
          </code>
        </pre>
      </example>
      <note>A complete list of Meters can be looked up in Resin-Admin's graphs
        section.</note>
    </s1>
    <!---->
    <s1 title="thread-dump">
      <p>Action thread-dump produces and returns thread dump.</p>
      <deftable title="thread-dump options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="user-add">
      <p>Action user-add adds administrative user.</p>
      <deftable title="user-add options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to query</td>
          <td></td>
        </tr>
        <tr>
          <td>user</td>
          <td>specifies user name</td>
          <td>required</td>
        </tr>
        <tr>
          <td>password</td>
          <td>specifies password</td>
          <td>required</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="user-list">
      <p>Action user-list lists administrative user.</p>
      <deftable title="user-list options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to query</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="user-remove">
      <p>Action user-remove removes administrative user added with user-add
        action.
      </p>
      <deftable title="user-remove options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to query</td>
          <td></td>
        </tr>
        <tr>
          <td>user</td>
          <td>specifies user name</td>
          <td>required</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="web-app-deploy">
      <p>Action web-app-deploy deploys a web application.</p>
      <deftable title="web-app-deploy options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td></td>
          <td>triad server to deploy to</td>
        </tr>
        <tr>
          <td>context</td>
          <td>web application context</td>
          <td>required</td>
        </tr>
        <tr>
          <td>host</td>
          <td>host to deploy to</td>
          <td>'default'</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>state to deploy to</td>
          <td>production</td>
        </tr>
        <tr>
          <td>version</td>
          <td>version e.g. 1.0.0</td>
          <td></td>
        </tr>
        <tr>
          <td>message</td>
          <td>commit message</td>
          <td></td>
        </tr>
      </deftable>

      <example title="deploying an application via REST">
        curl -H "Content-Type: " --data-binary @/tmp/my-app.war --user admin:secret 'http://localhost:8080/resin-rest/web-app-deploy?context=foo'
      </example>
    </s1>
    <!---->
    <s1 title="deploy-copy">
      <p>Action deploy-copy is used to copy an application from one context to
        another. Application copied from source context to a target context. The
        target context is started upon completion of the operation.</p>
      <deftable title="deploy-copy options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>source-context</td>
          <td>context to copy an application from e.g. /foo</td>
          <td>required</td>
        </tr>
        <tr>
          <td>source-host</td>
          <td>host to copy an application from</td>
          <td></td>
        </tr>
        <tr>
          <td>source-stage</td>
          <td>stage of the source deployment</td>
          <td>production</td>
        </tr>
        <tr>
          <td>source-version</td>
          <td>version of the source deployment</td>
          <td>HEAD</td>
        </tr>
        <tr>
          <td>target-context</td>
          <td>context to copy an application to e.g. /bar</td>
          <td>required</td>
        </tr>
        <tr>
          <td>target-host</td>
          <td>host to copy an application to</td>
          <td></td>
        </tr>
        <tr>
          <td>target-stage</td>
          <td>stage of the target deployment</td>
          <td></td>
        </tr>
        <tr>
          <td>target-version</td>
          <td>version of the target deployment</td>
          <td></td>
        </tr>
        <tr>
          <td>message</td>
          <td>commit message</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="deploy-list">
      <p>Action deploy-list lists deployed applications.</p>
      <deftable title="deploy-list options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
      </deftable>
    </s1>
    <!---->
    <s1 title="web-app-restart">
      <p>Action web-app-restart restarts an application.</p>
      <deftable title="web-app-restart options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>tag to restart e.g. (production/webapp/default/foo)</td>
          <td>required</td>
        </tr>
        <tr>
          <td>context</td>
          <td>context to restart</td>
          <td>required</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>deployment stage of the context</td>
          <td>production</td>
        </tr>
        <tr>
          <td>host</td>
          <td>deployment host</td>
          <td>'default'</td>
        </tr>
        <tr>
          <td>version</td>
          <td>deployment version</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
    <s1 title="web-app-start">
      <p>Action web-app-start starts web application.</p>
      <deftable title="web-app-start options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>tag to start e.g.(production/webapp/default/foo)</td>
          <td>required</td>
        </tr>
        <tr>
          <td>context</td>
          <td>context to start</td>
          <td>required</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>deployment stage of the context</td>
          <td>required</td>
        </tr>
      </deftable>
    </s1>
    <s1 title="web-app-stop">
      <p>Action web-app-stop stops web application.</p>
      <deftable title="web-app-stop options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>cluster server to query</td>
          <td>defaults to the current server</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>tag to start e.g.(production/webapp/default/foo)</td>
          <td>required</td>
        </tr>
        <tr>
          <td>context</td>
          <td>context to stop</td>
          <td>required</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>deployment stage of the context</td>
          <td>required</td>
        </tr>
      </deftable>
    </s1>
    <s1 title="web-app-undeploy">
      <p>Action web-app-undeploy un-deploys deployed web application.</p>
      <deftable title="web-app-undeploy options">
        <tr>
          <th>Parameter</th>
          <th>Description</th>
          <th>Default/Required</th>
        </tr>
        <tr>
          <td>server</td>
          <td>triad server to query</td>
          <td></td>
        </tr>
        <tr>
          <td>context</td>
          <td>context to undeploy</td>
          <td>required</td>
        </tr>
        <tr>
          <td>host</td>
          <td>context deployment host</td>
          <td>'default'</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>context deployment stage</td>
          <td>production</td>
        </tr>
        <tr>
          <td>version</td>
          <td>version</td>
          <td></td>
        </tr>
        <tr>
          <td>message</td>
          <td>commit message</td>
          <td></td>
        </tr>
      </deftable>
    </s1>
  </body>
</document>
