curl [options] -H "X-Auth-Token:<token>" \
https://<controller_ip>:8443/sdn/v2.0/apps
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
https://10.0.1.42:8443/sdn/v2.0/apps
{
"apps": [
{
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T19:22:49.536Z",
"desc": "Path Diagnostic Utility",
"download_url": "",
"name": "Path Diagnostics",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.hp.sdn.ctl.diag",
"vendor": "Hewlett-Packard",
"version": "2.3.5.6370"
},
{
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T19:22:50.890Z",
"desc": "Link Management",
"download_url": "",
"name": "Link Manager",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.hp.sdn.ctl.linkdisco",
"vendor": "Hewlett-Packard",
"version": "2.3.5.6370"
}
]
}
curl [options] -H "X-Auth-Token:<token>" \
https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
https://10.0.1.42:8443/sdn/v2.0/apps/com.hp.sdn.ctl.diag
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T19:22:49.536Z",
"desc": "Path Diagnostic Utility",
"download_url": "",
"name": "Path Diagnostics",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.hp.sdn.ctl.diag",
"vendor": "Hewlett-Packard",
"version": "2.3.5.6370"
}
}
The HEAD command on health status returns only the response code rather than the entire message for management-type clients that want to poll for health status. Returns HTTP status as follows:
200 for healthy |
290 for unhealthy |
295 for critical |
curl [options] -H "X-Auth-Token:" -w %{http_code} \
-X HEAD https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/health
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" -w %{http_code} \
-X HEAD https://10.0.1.42:8443/sdn/v2.0/apps/com.hp.sdn.ctl.diag/health
200
curl [options] -H "X-Auth-Token:<token>" \
-X POST https://<controller_ip>:8443/sdn/v2.0/apps/ \
--data-binary @<full_path_to_app_zip>
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/ \
--data-binary @/home/hummer/dev/flare/dist/testApps/geewiz-apps-1.0.0.zip
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "1970-01-01T00:00:00.000Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "STAGED",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "1.0.0"
}
}
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T23:04:25.955Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "UPGRADE_STAGED",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "2.0.0"
}
}
curl [options] -H "X-Auth-Token:" \
-X POST https://<controller_ip:8443/sdn/v2.0/apps/<app_id>/action \
-d install
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d install
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T21:46:39.845Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "1.0.0"
}
}
curl [options] -H "X-Auth-Token:<token>" \
-X POST https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/action \
-d upgrade
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d upgrade
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T23:04:25.955Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "2.0.0"
}
}
curl [options] -H "X-Auth-Token:<token>" \
-X POST https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/action \
-d disable
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d disable
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T23:04:25.955Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "DISABLED",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "2.0.0"
}
}
curl [options] -H "X-Auth-Token:<token>" \
-X POST https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/action \
-d enable
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d enable
{
"app": {
"action": "NONE",
"catalog_id": "",
"deployed": "2014-06-18T23:04:25.955Z",
"desc": "Gee Wiz event production",
"download_url": "",
"name": "GeeWiz",
"product_id": "",
"sku": "",
"state": "ACTIVE",
"uid": "com.geewiz",
"vendor": "Gee Wiz, Inc.",
"version": "2.0.0"
}
}
This curl request is used to remove a newly uploaded application before it is installed or upgraded. It has no output.
curl [options] -H "X-Auth-Token:<token>" \
-X POST https://<controller_ip>:8443/dn/v2.0/apps/<app_id>/action \
-d cancel
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d cancel
This curl request is used to shutdown and completely remove all application versions. It has no output.
curl [options] -H "X-Auth-Token:<token>" \
-X DELETE https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X DELETE https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz