6.2

Table Of Contents
6 (UNIX only) Determine which version of java the script uses.
%sh -x bin/vcac-cli
7 Update your PATH environment variable to include the location of the bin folder.
What to do next
Choosing Your Mode of Operation
The REST API Explorer has three modes of operation to accommodate new and experienced users.
n
Use the Interactive Mode
The easiest way to use and learn the vRealize Automation API Explorer is with the interactive mode.
n
Use the Command Line Mode
The command line mode lets you incorporate vcac-cli commands in other scripts and programs.
n
Use the Script Mode
The script mode is similar to the command line mode, except that you can invoke multiple
commands in sequence.
Use the Interactive Mode
The easiest way to use and learn the vRealize Automation API Explorer is with the interactive mode.
Every command you type in interactive mode is appended to the spring-shell.log file in your current
folder. This file retains a history of commands you have issued. It also serves as an example of what a
CLI Script File looks like. While using this mode, you can navigate your command history by pressing the
up-arrow and down-arrow keys on your keyboard.
The vcac-cli supports tab auto-completion and context-sensitive help on both Windows and UNIX. For
example, if you enter rest g and then press the Tab key, the command expands to rest get. If you
press the Tab key again, vcac-cli displays all options for the command. See the following examples.
vcac-cli>rest
Rest delete rest get rest post rest put
vcac-cli>rest get --
Rest get --service rest get --u rest get --uri
vcac-cli>rest get --f
rest get --f rest get --format
vcac-cli>rest get --format
rest get --format
optional – format: format (JSON, table raw, …); default: ‘JSON’
vcac-cli>rest get --format
JSON compactTable raw solidBorderTable table
Programming Guide
VMware, Inc. 400