Use the command line

The command-line interface (CLI) provides access to the Deployment Automation server. You can use it to perform numerous functions, such as find or set properties.

Install the command-line client

To install the command line client, download and extract its files from a zip file. The typical name is DA-Client<version>.zip.

The command line client must be downloaded separately from the server installer.

The extracted files include the da directory that contains:

  • da-client.cmd and shell files for Windows and UNIX/Linux.
  • The lib directory with the command-line client's executable .jar files.

Back to top

Run commands

From the command prompt, or in a batch or shell file, run commands with the required and optional global arguments plus any necessary options.

To run a command:

  • Use the following format:

    da-client [global-args...] [global-flags...]
    <command> [args...]
  • Apply the following global arguments:

    Argument Description
    -authtoken, –authtoken (Optional) Can be set using the environment variable DS_AUTH_TOKEN. An authentication token generated by the server. Either an authtoken or a username and password is required.
    -password, –password (Optional) Can be set using the environment variable DS_PASSWORD. A password to authenticate with the server. Either an authtoken or a username and password is required.
    -username, –username (Optional) Can be set using the environment variable DS_USERNAME. A username to authenticate with the server. Either an authtoken or a username and password is required.
    -weburl, –weburl

    (Required) Can be set using the environment variable DS_WEB_URL. The base URL of the Deployment Automation server, for example:

    "http://<serverName>:8080/da"

  • Use the following global flags:

    Flag Description
    -t, –getTemplate Show the JSON template for the command instead of running the command. If a file argument is provided, the template is output to that file.
    -h, –help Print the full description and help of the given command instead of running the command.
    -v, –verbose Print extra information during execution.

    Note: CLI commands and parameters are case-sensitive.

Back to top

Command example

Here is an example of using the getResources command and a Common Tomcat application server default port:

da-client -weburl "http://<serverName>:8080/da" 
    -username admin -password admin getResources 

Note: CLI commands do not support new lines. Sample entries are broken for display purposes only.

Tip: The command line client is a Java application. You may need to set your JAVA_HOME environment variable to run the commands from the command line, for example:

JAVA_HOME=<jre-install-directory>

For a list of available commands, see Command reference.

Back to top