Close a client connection
Purpose
Closes a client connection.URI
Use the Eclipse Amlen REST API POST method with the following service URI:
http://<admin-endpoint-IP:Port>/ima/v1/service/close/connection
Object configuration data
Provide object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:
{
"ClientID":"string",
"ClientAddress":"string",
"UserID":"string"
}
Where:- ClientID
- Specifies the client ID of the connection, or connections, that you want to close.
- ClientAddress
- Specifies the IP address of the connection, or connections, that you want to close.
- UserID
- Specifies the user ID of the connection, or connections, that you want to close.
Usage NotesĀ®
- You must specify at least one of the object configuration data parameters.
- You can specify more than one value by using a comma separated list.
- You can use wildcard characters.
- If the parameter specified applies to more than one client connection, all applicable client connections are closed.
- Do not use this REST API unless you are certain that the connection needs to be closed. Unnecessarily closing connections can affect performance.
Example
Close all connections with 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
An example response to the POST method:
{
"Version":"v1",
"Code":"CWLNA6137",
"Message":"The specified connections were closed. Number of connections closed = 1"
}
To verify that all the connections are closed, re-issue the same REST API POST
method:
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 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."
}