HP VAN SDN Controller Administrator Guide

77
B cURL Commands
Caution
Credential information (user name, password, domain, and authentication tokens) used in
cURL commands may be saved in the command history. For security reasons, HP
recommends that you disable command history prior to executing commands containing
credential information.
Note
Examples of cURL commands in this guide use the "--noproxy" option, which is
appropriate where execution of cURL commands does not need a proxy to access
controllers. If your network is set up such that a proxy is needed to access controllers, use
the "--proxy" option. For details on cURL proxy options, visit
http://curl.haxx.se/docs/manpage.html .
Application Manager Actions
Upload an Application
curl --noproxy <controller_ip> --header X-Auth-Token:<authentication_token> -ksS --
fail --url https://<controller_ip>:<port>/sdn/v2.0/apps/ --header
filename:<zip_file_name_to_be_uploaded> --data-binary @<path_of_file_to_be_uploaded> -
-request POST
Example of Uploading an Application
curl --noproxy 192.168.49.86 --header X-Auth-Token:c405ff2d249c4a609229466c32932a82 -
ksS --fail --url https://192.168.49.86:8443/sdn/v2.0/apps/ --header filename:golly-
gee-app_1.14.zip --data-binary @/home/abhirup/golly-gee-app_1.14.zip --request POST
Install an Uploaded (STAGED) Application
curl --noproxy <controller_ip> --header X-Auth-Token:<authentication_token> -ksS --
fail --url https://<controller_ip>:<port>/sdn/v2.0/apps/<AppId>/action/ -d install --
request POST
Example of Installing an Uploaded Application
curl --noproxy 192.168.49.86 --header X-Auth-Token:c405ff2d249c4a609229466c32932a82 -
ksS --fail --url https://192.168.49.86:8443/sdn/v2.0/apps/com.golly.gee/action/ -d
install --request POST
Starting a Stopped (RESOLVED) Application
curl --noproxy <controller_ip> --header X-Auth-Token:<authentication_token> -ksS --
fail --url https://<controller_ip>:<port>/sdn/v2.0/apps/<AppId>/action/ -d start --
request POST