/management/wls/{version}/deployments/application/id/{application-name}

This resource manages an application.

The resource supports the following methods:

DELETE Method

The DELETE method undeploys the application identified by the resource URL.

Roles

Administrator

Request Query Parameters

This resource launches a job to undeploy the application.

_detached

(optional) Specifies whether this method runs in detached (background) mode or synchronously.

If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).

Response Body

If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.

This method can return the following links:

  • uri=/wls/jobs/deployment/{job-id} rel=job title=id

Response Codes

If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.

If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.

Example

Example 1   Undeploying an Application

This example uses the DELETE method to undeploy an application.

Example Request

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X DELETE http://localhost:7001/management/wls/latest/deployments/application/id/BasicApp

Example Response

HTTP/1.1 200 OK

Response Body:
{
    "messages": [{
        "message": "Undeployed the application 'BasicApp'.",
        "severity": "SUCCESS"
    }],
    "links": [{
        "rel": "job",
        "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/2"
    }],
    "item": {
        "operation": "remove",
        "status": "completed",
        "beginTime": 1390587119309,
        "endTime": 1390587119588,
        "name": "ADTR-2",
        "id": "2",
        "type": "deployment",
        "targets": [{
            "errors": [],
            "status": "completed",
            "name": "myserver",
            "type": "server"
        }],
        "deploymentName": "BasicApp",
        "description": "[Deployer:149026]remove application BasicApp on myserver."
    }
}
Example 2   Undeploying an Application Asynchronously

This example uses the DELETE method to undeploy an application asynchronously.

Example Request

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X DELETE http://localhost:7001/management/wls/latest/deployments/application/id/fairShare?__detached=true

Example Response

HTTP/1.1 202 Accepted

Response Body:
{
    "messages": [{
        "message": "Undeploying the application 'fairShare'.",
        "severity": "SUCCESS"
    }],
    "links": [{
        "rel": "job",
        "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/35"
    }]
}

GET Method

The GET method on this resource returns information about the application identified by the resource URL.

Roles

Administrator, Deployer, Operator, Monitor

Response Body

The response body returned includes an Application entity that contains information about the specified application.

This method can return the following links:

  • uri=/management/wls/{version}/deployments/application/id/{application-name}/bindables rel=bindables

  • uri=/management/wls/{version}/deployments/application rel=parent

  • uri=/management/wls/{version}/deployments/application/id/{application-name}/redeploy rel=action title=redeploy

  • uri=/management/wls/{version}/deployments/application/id/{application-name}/update rel=action title=update

  • uri=/management/wls/{version}/deployments/application/id/{application-name}/start rel=action title=start

  • uri=/management/wls/{version}/deployments/application/id/{application-name}/stop rel=action title=stop

Response Codes

This method returns one of the Standard HTTP Status Codes.

Example

Example 1   Viewing an Application

This example uses the GET method to display information about a specific application.

Example Request

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X GET http://localhost:7001/management/wls/latest/deployments/application/id/fairShare

Example Response

HTTP/1.1 200 OK

Response Body:
{
    "links": [
        {
            "rel": "parent",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/redeploy",
            "title": "redeploy"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/update",
            "title": "update"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/start",
            "title": "start"
        },
        {
            "rel": "action",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/stop",
            "title": "stop"
        },
        {
            "rel": "bindables",
            "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/bindables"
        }
    ],
    "item": {
        "name": "fairShare",
        "state": "active",
        "type": "application",
        "targets": [
            "myserver",
            "Cluster-0"
        ],
        "servlets": [
            {
                "servletName": "SimpleSlowServlet",
                "contextPath": "\/fairShare",
                "aggregateMetrics": {
                    "executionTimeTotal": 0,
                    "invocationTotalCount": 0,
                    "reloadTotalCount": 0,
                    "executionTimeHigh": 0,
                    "executionTimeLow": 0
                },
                "servletMetrics": [
                    {
                        "serverName": "myserver",
                        "executionTimeTotal": 0,
                        "invocationTotalCount": 0,
                        "reloadTotalCount": 0,
                        "executionTimeHigh": 0,
                        "executionTimeLow": 0
                    }
                ]
            },
            {
                "servletName": "SimpleFastServlet",
                "contextPath": "\/fairShare",
                "aggregateMetrics": {
                    "executionTimeTotal": 0,
                    "invocationTotalCount": 0,
                    "reloadTotalCount": 0,
                    "executionTimeHigh": 0,
                    "executionTimeLow": 0
                },
                "servletMetrics": [
                    {
                        "serverName": "myserver",
                        "executionTimeTotal": 0,
                        "invocationTotalCount": 0,
                        "reloadTotalCount": 0,
                        "executionTimeHigh": 0,
                        "executionTimeLow": 0
                    }
                ]
            },
            {
                "servletName": "JspServlet",
                "contextPath": "\/fairShare",
                "aggregateMetrics": {
                    "executionTimeTotal": 0,
                    "invocationTotalCount": 0,
                    "reloadTotalCount": 0,
                    "executionTimeHigh": 0,
                    "executionTimeLow": 0
                },
                "servletMetrics": [
                    {
                        "serverName": "myserver",
                        "executionTimeTotal": 0,
                        "invocationTotalCount": 0,
                        "reloadTotalCount": 0,
                        "executionTimeHigh": 0,
                        "executionTimeLow": 0
                    }
                ]
            },
            {
                "servletName": "FileServlet",
                "contextPath": "\/fairShare",
                "aggregateMetrics": {
                    "executionTimeTotal": 0,
                    "invocationTotalCount": 0,
                    "reloadTotalCount": 0,
                    "executionTimeHigh": 0,
                    "executionTimeLow": 0
                },
                "servletMetrics": [
                    {
                        "serverName": "myserver",
                        "executionTimeTotal": 0,
                        "invocationTotalCount": 0,
                        "reloadTotalCount": 0,
                        "executionTimeHigh": 0,
                        "executionTimeLow": 0
                    }
                ]
            }
        ],
        "displayName": "fairShare",
        "urls": [
            "http:\/\/localhost:7001\/fairShare"
        ],
        "planPath": null,
        "applicationType": "war",
        "openSessionsCurrentCount": 0,
        "sessionsOpenedTotalCount": 0,
        "health": {"state": "ok"},
        "deploymentPath": "\/deployments\/fairShare.war",
        "ejbs": []
    }
}