Apps

List apps

Sample request 

List all apps:

GET /sdn/v2.0/apps

There is no request body for this API.

Sample response 

{
    "apps": [
        {
            "deployed": "2013-10-16T21:15:09.793Z", 
            "desc": "Path analysis", 
            "name": "Path Daemon", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.ctl.path", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }, 
        {
            "deployed": "2013-10-16T21:15:10.384Z", 
            "desc": "Node Management", 
            "name": "Node Manager", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.ctl.nodemgr", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }, 
        {
            "deployed": "2013-10-16T21:15:10.535Z", 
            "desc": "Path Diagnostic Utility", 
            "name": "Path Diagnostics", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.ctl.diag", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }, 
        {
            "deployed": "2013-10-16T21:15:10.238Z", 
            "desc": "Topology Management", 
            "name": "Topology Manager", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.ctl.topo", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }, 
        {
            "deployed": "2013-10-16T21:15:10.922Z", 
            "desc": "Topology Viewer", 
            "name": "Topology Viewer", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.tvue", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }, 
        {
            "deployed": "2013-10-16T21:15:10.688Z", 
            "desc": "Link Management", 
            "name": "Link Manager", 
            "state": "ACTIVE", 
            "uid": "com.hp.sdn.ctl.linkdisco", 
            "vendor": "Hewlett-Packard", 
            "version": "1.21.0.SNAPSHOT"
        }
    ]
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503

Deploy app

Sample request 

Deploy app to staging:

POST /sdn/v2.0/apps

Request body is binary data, consisting of the binary that make up the Aurora controller to be deployed. The binary data is expected to have meta information containing the app's version, vendor, name, and optional description.

Sample response 

{
   "app":{
      "uid":"com.hp.cloud",
      "version":"01.11.00.2342",
      "vendor":"Hewlett-Packard",
      "name":"Cloud Controller",
      "desc":"Cloud Network Controller",
      "state":"INSTALLED",
      "deployed":"2013-05-23T10:09:08.000Z"
   }
}

Location header: /sdn/v2.0/apps/{app_uid}

Response codes 

  • Normal: Created (201)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Apps/{app uid}

Get app info

Sample request 

Get app info:

GET /sdn/v2.0/apps/com.hp.sdn.tvue

There is no request body for this API.

Sample response 

{
    "app": {
        "deployed": "2013-10-16T21:15:10.922Z", 
        "desc": "Topology Viewer", 
        "name": "Topology Viewer", 
        "state": "ACTIVE", 
        "uid": "com.hp.sdn.tvue", 
        "vendor": "Hewlett-Packard", 
        "version": "1.21.0.SNAPSHOT"
    }
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Un-deploy app

Sample request 

Un-deploy app:

DELETE /sdn/v2.0/apps/com.hp.sdn.tvue

There is no request body for this API.

Sample response 

There is no response body for this API.

Response codes 

  • Normal: No Content (204)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Apps/{app uid}/action

Install a deployed app

Sample request 

Install and start a staged (deployed) app:

POST /sdn/v2.0/apps/{app_uid}/action

Request body: install

Sample response 

{
    "app": {
        "deployed": "2013-10-16T21:15:10.922Z", 
        "desc": "Topology Viewer", 
        "name": "Topology Viewer", 
        "state": "ACTIVE", 
        "uid": "com.hp.sdn.tvue", 
        "vendor": "Hewlett-Packard", 
        "version": "1.21.0.SNAPSHOT"
    }
} 

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503

Enable a stopped app

Sample request 

Enable a disabled app:

POST /sdn/v2.0/apps/{app_uid}/action

Request body: enable

Sample response 

{
    "app": {
        "deployed": "2013-10-16T21:15:10.922Z", 
        "desc": "Topology Viewer", 
        "name": "Topology Viewer", 
        "state": "ACTIVE", 
        "uid": "com.hp.sdn.tvue", 
        "vendor": "Hewlett-Packard", 
        "version": "1.21.0.SNAPSHOT"
    }
} 

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Disable a started app

Sample request 

Disable a started app:

POST /sdn/v2.0/apps/{app_uid}/action

Request body: disable

Sample response 

{
    "app": {
        "deployed": "2013-10-16T21:15:10.922Z", 
        "desc": "Topology Viewer", 
        "name": "Topology Viewer", 
        "state": "DISABLED", 
        "uid": "com.hp.sdn.tvue", 
        "vendor": "Hewlett-Packard", 
        "version": "1.21.0.SNAPSHOT"
    }
} 

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Apps/{app uid}/health

Get app health

Sample request 

Get app health:

GET /sdn/v2.0/apps/{app_uid}/health

There is no request body for this API.

Sample response 

{
    "app": {
        "deployed": "2013-10-16T21:15:10.922Z", 
        "name": "Topology Viewer", 
        "state": "ACTIVE", 
        "status": "OK", 
        "uid": "com.hp.sdn.tvue"
    }
}

Valid states reflect OSGi states

Valid statuses are: OK, WARN

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Monitor app health

Sample request 

Monitor app health:

HEAD /sdn/v2.0/apps/{app_uid}/health

There is no request body for this API.

Sample response 

There is no response body for this API.

Response codes 

  • Normal: OK (200)

  • Warning encountered: WARN (290)

  • Error encountered: ERROR (295)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503