Closing client connections
You can close client connections by using a REST Administration API. You can specify one or more attributes to identify the connections to close. The attributes that you can specify are the client ID, the client IP address, and the user ID of the client.
If the object configuration parameter that is specified in the REST Administration API applies to more than one client connection, all applicable client connections are closed. Therefore, ensure that you specify a parameter that does not apply to more client connections than the ones you want to close.
Do not use this command unless you are certain that the connection needs to be closed. Unnecessarily closing connections can affect performance.
The following example shows the POST method to close all connections with Client ID
Client38104
or Client ID Client38105
by using cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d ' {
"ClientID":"Client38104,Client38105"
}
' \
http://127.0.0.1:9089/ima/v1/service/close/connection
The following shows an example response to the POST method:
{
"Version":"v1",
"Code":"CWLNA6137",
"Message":"The specified connections were closed. Number of connections closed = 2"
}
curl -X POST \
-H 'Content-Type: application/json' \
-d ' {
"ClientID":"Client38104,Client38205"
}
' \
http://127.0.0.1:9089/ima/v1/service/close/connection
The
following example response to the re-issued POST command is expected:
{
"Version":"v1",
"Code":"CWLNA6136",
"Message":"The specified connection was not closed. The specified connection cannot be found."
}