Delete a Server Instance
You can use the DELETE request to remove server instances from a WebLogic domain. The following steps show how to build this DELETE request using cURL:
-
Identify the host name, port and the name of your domain's Administration Server. Construct the DELETE request using the
/management/weblogic/{version}/edit/servers
endpoint. In the URL, you must specify the name of the server you wish to remove:http://localhost:port/management/weblogic/{version}/edit/servers/{name}
-
Specify the headers on the cURL command line:
-
-H X-Requested-By:MyClient
-
-H Accept:application/json
-
The following sample shows the complete DELETE request for removing the server, server1.
curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X DELETE http://localhost:7001/management/weblogic/latest/edit/servers/server1
If successful, the response body returns a status code of 200 that confirms the removal of the server instance.
HTTP/1.1 200 OK
Response Body:
{}