The script mode is similar to the command line mode, except that you can invoke multiple commands in sequence.
About this task
In script mode, you must first create a text file which contains a series of vcac-cli interactive-mode commands. Vcac-cli executes the commands in sequence.
Install the API Explorer, if necessary.
Your PATH environment variable must contain the location of the vcac-cli (UNIX) or vcac_cli.bat (Windows) script.
- Create a text file containing a series of vcac-cli interactive-mode commands.
For example, enter the folllowing commands in a file named script.txt.
login --url https://vcac152-009-067.eng.vmware.com --user email@example.com --password password --tenant MYCOMPANY rest get --service workitem-service --u workitems
- Run the script and redirect the output.
$ vcac-cli script script.txt 2> script.out