Viewing and closing web sessions
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
Common request parameters
The parameters below are passed in the URL query string part (?param=value) for GET and DELETE requests, and for POST — in the request body.
The parameters are used to limit the request application area.
They are optional and may be absent.
| Name | Type | Description |
|---|---|---|
|
|
List of site names or a string with one of the special values in JSON format. For example |
Getting the list of open web sessions.
Returns the list of open web sessions on the current site or on the site(s) specified in the request.
Request
There are no additional parameters. Only the common site filter applies.
GET /rest/v1/master/master/logicalroles/ws/sessions?sites=["SITE1"] HTTP/1.1
Response
Contains the list of open web sessions.
| Name | Description |
|---|---|
|
Active |
|
Web session domain. |
|
Web session user login in the domain. |
|
Web session identifier. |
|
Web session type. |
|
Web session site. |
|
Remaining web session lifetime in seconds. |
|
Web session user identifier in the domain. |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"domain": "master.domain",
"login": "curl",
"session_id": "a1cd9a88-0176-9a15-d1c0-e0d55e0cd303",
"session_type": "http",
"site": "central",
"ttl": 43187,
"user_id": "32328e08-016c-f61d-4ef4-e0d55e0cd303"
},
{
"domain": "master.domain",
"login": "adminma",
"session_id": "0f274f6b-0176-99e4-5ca7-e0d55e0cd303",
"session_type": "http",
"site": "central",
"ttl": 39946,
"user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
},
{
"domain": "master.domain",
"login": "adminma",
"session_id": "16d72c4c-0176-99e7-5545-e0d55e0cd303",
"session_type": "http",
"site": "central",
"ttl": 40141,
"user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
},
{
"connections": [
{
"conn_id": "5476d54a-0176-9a16-92a0-e0d55e0cd303",
"is_pid_alive": true,
"node": "ws1@192.168.0.32",
"pid": "<0.11647.54>"
}
],
"domain": "master.domain",
"login": "adminma",
"session_id": "16d72c4c-0176-99e7-5545-e0d55e0cd303",
"session_type": "websocket",
"site": "central",
"ttl": 40141,
"user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
}
]
Closing all user web sessions in the domain
Closes all user web sessions in the domain except the session used in the request.
Request
The request may contain additional scope parameters.
| Name | Type | Description |
|---|---|---|
|
|
Action. The field must contain the value |
|
|
Domain for closing sessions. |
|
|
User for closing sessions. Either |
POST /rest/v1/master/logicalroles/ws/sessions HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"action": "logout",
"domain": "master.domain",
"user": "admin",
"sites": "all"
}
Closing one web session
Closes the web session with the specified identifier.
Request
The request may contain additional scope parameters.
DELETE /rest/v1/master/logicalroles/ws/sessions/51e6cad2-0176-8f8e-a432-e0d55e0cd303?sites="all" HTTP/1.1