Skip to main content
Version: 3.8.x.x LTS

Deployment of a given configuration

The API supports the commit and deploy of a given configuration as you know it from the GUI.

An existing configuration can be deployed as follows:

  1. Get to know the ID of the environment that you want to deploy the configuration for (refer to the chapter: Reading configuration, for details). Then, obtain the list of revisions for a given environment. The request would look as follows: https://<hostname>:8037/nevisadmin/rest/operation/environment/<environmentId>/revision

    This will provide a list of committed versions (revisions) for the given environment. For example:

    List of committed versions (revisions)
    <?xml version="1.0" encoding="UTF-8"?>
    <references>
    <reference type="revision" id="rev20160519155305" name="test">
    <link href="https://localhost:8037/nevisadmin/rest/operation/environment/id-
    cea57404-4e46-4cba-aa89-cc18cbb46772/revision/rev20160519155305"/>
    </reference>
    </references>
  2. Create a new deployment (POST request) by providing in the request body the ID of the revision that you want to deploy, for example rev20160519155305. You can also set the revision ID to "latest" if you want to deploy the newest revision that is available. This will provide a deployment resource, for example:

    Deployment resource
    <?xml version="1.0" encoding="UTF-8"?>
    <references>
    <reference type="deployment" id="14637407860" name="14637407860">
    <link href="https://localhost:8037/nevisadmin/rest/operation/environment/id-
    cea57404-4e46-4cba-aa89-cc18cbb46772/deployment/14637407860"/>
    </reference>
    </references>
  3. Check the status of a deployment by reading the deployment resource that has just been created. The request would look as follows: https://<hostname>:8037/nevisadmin/rest/operation/environment/<environmentId>/deployment/<deploymentId>

    This will return a deployment status object such as:

    Deployment status resource
    <?xml version="1.0" encoding="UTF-8"?>
    <deploymentStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="deploymentStatus" id="14637407860" name="14637407860">
    <revisionId>rev20160519155305</revisionId>
    <isFinished>true</isFinished>
    </deploymentStatus>
info

A list of current (ongoing) and past deployments can be retrieved by sending a GET request to: https://<hostname>:8037/nevisadmin/rest/operation/environment/<environmentId>/deployment