Shutdown ( Timeout, Ignore Sessions, Wait For All Sessions )
/management/weblogic/{version}/domainRuntime/serverLifeCycleRuntimes/{name}/shutdown
Gracefully shutdown the server after handling inflight work. The following inflight work is handled :
- Pending transaction's and TLOG checkpoint 
- Pending HTTP sessions 
- Pending JMS work 
- Pending work in the Work Managers 
- RMI requests with tx context or administrator calls 
This method supports both asynchronous and best effort synchronous invocations. The behavior is controlled by the 'Prefer' header.
Request
- application/json
- 
                    name(required): string
                    
                    The name property of the instance in the collection.
- 
                    version(required): string
                    
                    The version of the WebLogic REST interface.
- 
                        Prefer: string
                        
                        The 'Prefer' header parameter can be used to specify the preference on how this method runs. A value of 'respond-async' specifies a preference to submit the request and return immediately without waiting for completion. Alternatively a value of 'wait=#seconds' specifies a preference to wait for #seconds for method completion before returning. If the Prefer header is not specified or invalid, then a 300 second wait will be used.
- 
                        X-Requested-By(required): string
                        
                        The 'X-Requested-By' header is used to protect against Cross-Site Request Forgery (CSRF) attacks. The value is an arbitrary name such as 'MyClient'.
Must contain the following fields:
objectArguments- 
            ignoreSessions: 
            boolean
            Set to trueto ignore pending HTTP sessions during inflight work handling.
- 
            timeout: 
            integer(int32)
            Number of seconds to wait before aborting inflight work and force shutting down the server. 
- 
            waitForAllSessions: 
            boolean
            Set to trueto wait for all HTTP sessions duirng inflight work handling;falseto wait for non-persisted HTTP sessions only.
- 
                        Admin: basic
                        
                        Type:basicDescription:A user in the Admin security role.
- 
                        Operator: basic
                        
                        Type:basicDescription:A user in the Operator security role.
Response
- application/json
200 Response
Returns the following fields:
objectReturn- 
            return: 
            array  Server Life Cycle Task Runtime Reference
            
            Title:Server Life Cycle Task Runtime ReferenceContains the server life cycle task runtime reference.Returns the action's result. 
arrayServer Life Cycle Task Runtime ReferenceReturns the action's result.
Examples
Synchronously invoke the shutdown action.
This example uses the POST method to synchronously invoke the shutdown action.
Example Request
curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{ timeout: 20, ignoreSessions: true, waitForAllSessions: true }" \
-X POST http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster-0-Server-1/shutdown?links=job,abort&fields=completed,progress,serverName,operation,taskStatus
Example Response
HTTP/1.1 200 OK
Response Body:
{
    "links": [{
        "rel": "job",
        "href": "http:\//localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster-0-Server-1/tasks/_13_shutdown"
    }],
    "progress": "success",
    "serverName": "Cluster-0-Server-1",
    "operation": "shutdown",
    "taskStatus": "TASK COMPLETED",
    "completed": true
}
Asynchronously invoke the shutdown action.
This example uses the POST method to asynchronously invoke the shutdown action.
Example Request
curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{ timeout: 20, ignoreSessions: true, waitForAllSessions: true }" \
-H "Prefer:respond-async" \
-X POST http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster-0-Server-1/shutdown?links=job,abort&fields=completed,progress,serverName,operation,taskStatus
Example Response
HTTP/1.1 202 Accepted
Location: http://localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster-0-Server-1/tasks/_27_shutdown
Response Body:
{
    "links": [{
        "rel": "job",
        "href": "http:\//localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/Cluster-0-Server-1/tasks/_27_shutdown"
    }],
    "progress": "processing",
    "serverName": "Cluster-0-Server-1",
    "operation": "shutdown",
    "taskStatus": "TASK IN PROGRESS",
    "completed": false
}
                Back to Top