The api/active-sessions endpoint has only one parameter and it only serves the DELETE request that closes the specified session.
URL
DELETE https://<IP-address-of-SPS>/api/active-sessions?id=<session_id>
Sample request
The following command lists the Access Control Lists (ACLs):
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/acls
The user (in this example, user1) has to be a member of a group that has read and write/perform privileges for Active Sessions (/special/active_sessions). After authentication, user1 can close the active session determined by the session ID.
curl -k --user user1 --cookie-jar /tmp/cookie https://192.168.122.194/api/authentication
curl -k --cookie /tmp/cookie https://192.168.122.194/api/active-sessions?id=svc/rpokH8fD9kx6CaxNLznKx2/test:12 -X DELETE
Closing active sessions in a cluster environment
In a cluster environment, after authentication, user1 can close active sessions recorded on Search Minion nodes through the Search Master node's IP address.
curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Master-SPS>/api/active-sessions?id=<session_id> -X DELETE
Active sessions recorded on the Search Local node can be closed only from the node itself.
curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Local-SPS>/api/active-sessions?id=<session_id> -X DELETE
Active sessions recorded on the Search Minion node can be closed from the node itself, as well.
curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Minion-SPS>/api/active-sessions?id=<session_id> -X DELETE
NOTE: The following scenarios are not supported:
- Closing an active session recorded on Search Local node from the Search Master node.
400 |
SessionIdMissing |
No session ID is given in the "id" query parameter. |
404 |
SessionCouldNotBeFound |
No session could be found for the given session ID. Select an ongoing session at the Active Connections page on the Web UI and give its session ID as "id" query parameter. |
500 |
SessionTerminationFailed |
The session could not be terminated due to internal errors. |
500 |
RemoteNodeInfoMissing |
The cluster node where the session is being recorded is missing from your primary node's configuration. For assistance, contact our Support Team. |
503 |
SessionTerminationServiceUnavailable |
Session termination service is unavailable on the specific host for closing sessions. To make sure session termination service is running, login to the host CLI and issue the 'systemctl restart sessionterminationservice.service' command. |
504 |
MinionUnavailable |
The minion node that is recording the session is unavailable. To get more information about the missing node, navigate to /api/cluster/status. |
Contains the endpoints for managing users and usergroups locally on SPS.
URL
GET https://<IP-address-of-SPS>/api/configuration/aaa/local_database
Sample request
The following command lists the endpoints of the local database.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/local_database
Response
The following is a sample response received when listing the endpoint.
{
"items": [
{
"key": "groups",
"meta": {
"href": "/api/configuration/aaa/local_database/groups"
}
},
{
"key": "users",
"meta": {
"href": "/api/configuration/aaa/local_database/users"
}
}
],
"meta": {
"first": "/api/configuration/aaa/acls",
"href": "/api/configuration/aaa/local_database",
"last": "/api/configuration/aaa/settings",
"next": "/api/configuration/aaa/settings",
"parent": "/api/configuration/aaa",
"previous": "/api/configuration/aaa/acls",
"transaction": "/api/transaction"
}
}
groups |
Endpoint that contains local usergroups. |
users |
Endpoint that contains local usernames. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
Contains the local usergroups of SPS. You can use local groups to control the privileges of SPS local and LDAP users — who can view and configure what. You can edit the group memberships here as well.
URL
GET https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups
Sample request
The following command lists the local usergroups.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups
Response
The following is a sample response received when querying a particular usergroup endpoint.
{
"body": {
"members": [],
"name": "http-write"
},
"key": "ca2dc85730ca082ee6b5c8",
"meta": {
"first": "/api/configuration/aaa/local_database/groups/224696054489c27f6c5710",
"href": "/api/configuration/aaa/local_database/groups/ca2dc85730ca082ee6b5c8",
"last": "/api/configuration/aaa/local_database/groups/ca2dc85730ca082ee6b5f8",
"next": "/api/configuration/aaa/local_database/groups/b080b1ba546232548bb1f9",
"parent": "/api/configuration/aaa/local_database/groups",
"previous": "/api/configuration/aaa/local_database/groups/b080b1ba546232548bb1a9",
"transaction": "/api/transaction"
}
}
body |
|
Top level element (JSON object) |
Contains the properties of the usergroup. |
|
members |
list |
Lists the names of the users belonging to the group. |
|
name |
string |
The name of the group. |
key |
|
string |
Top level element, contains the ID of the endpoint. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
409 |
NoTransaction |
No open Transaction is available. You must open a transaction first (for details, see Open a transaction). |
Add new local usergroup
To create a new local usergroup, you have to POST the name and members of the group as a JSON object to the https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups endpoint. For details, see Create a new object.
-
Open a transaction.
For details, see Open a transaction.
-
Create a new usergroup.
POST the name of the group and the list of member accounts as a JSON object to the https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups endpoint. The body of the POST request should be the following. Note that you must refer to existing user accounts, and use their reference IDs, not their usernames.
{
"name": "new-userggroup",
"members": ["46785097158061f46c63d0", "1362061674580df4e00620d"]
}
For example:
curl -X POST -H "Content-Type: application/json" --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups --data '{"name": "new-usergroup", "members": ["46785097158061f46c63d0", "1362061674580df4e00620d"]}'
If the POST request is successful, the response includes a reference ID for the usergroup object.
-
Commit your changes.
For details, see Commit a transaction.
Delete usergroup
To delete a usergroup, you have to:
-
Open a transaction (for details, see Open a transaction).
-
DELETE the https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups/<ID-of-the-group> endpoint. For details, see Delete an object. If the DELETE request is successful, the response includes only the meta object, for example:
{
"meta": {
"href": "/api/configuration/aaa/local_database/groups/b080b1ba546232548bb1a9",
"parent": "/api/configuration/aaa/local_database/groups"
}
}
-
Commit your changes to actually delete the object from SPS (for details, see Commit a transaction).
Delete user from usergroup
To delete a user from a usergroup, you have to:
-
Open a transaction (for details, see Open a transaction).
-
Create an updated version of the usergroup object that does not include the user you want to delete.
-
PUT the updated usergroup object to the https://<IP-address-of-SPS>/api/configuration/aaa/local_database/groups/<ID-of-the-group> endpoint. For details, see Delete an object.
-
Commit your changes to actually delete the object from SPS (for details, see Commit a transaction).
Contains the local users of SPS. You can use local users and groups to control the privileges of SPS local and LDAP users — who can view and configure what.
NOTE: The admin user is available by default and has all possible privileges. It is not possible to delete this user.
Local users cannot be managed when LDAP authentication is used. When LDAP authentication is enabled, the accounts of local users is disabled, but they are not deleted,
When using RADIUS authentication together with local users, the users are authenticated to the RADIUS server, only their group memberships must be managed locally on SPS.
For details, see Login settings.
URL
GET https://<IP-address-of-SPS>/api/configuration/aaa/local_database/users
Sample request
The following command lists the local users.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/local_database/users
The following command displays the parameters of a specific user.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/aaa/local_database/users/<ID-of-the-user>
Response
The following is a sample response received when querying the list of users.
{
"items": [
{
"key": "103640099357f3b14f0529a",
"meta": {
"href": "/api/configuration/aaa/local_database/users/103640099357f3b14f0529a"
}
},
{
"key": "46785097158061f46c63d0",
"meta": {
"href": "/api/configuration/aaa/local_database/users/46785097158061f46c63d0"
}
}
],
"meta": {
"first": "/api/configuration/aaa/local_database/groups",
"href": "/api/configuration/aaa/local_database/users",
"last": "/api/configuration/aaa/local_database/users",
"next": null,
"parent": "/api/configuration/aaa/local_database",
"previous": "/api/configuration/aaa/local_database/groups",
"transaction": "/api/transaction"
}
}
The following is a sample response received when querying a specific user.
{
"body": {
"name": "testuser",
"password": {
"key": "8f84d7d1-9de1-429a-a7a7-c33a61cc7419",
"meta": {
"href": "/api/configuration/passwords/8f84d7d1-9de1-429a-a7a7-c33a61cc7419"
}
},
"password_created": 1476796261
},
"key": "46785097158061f46c63d0",
"meta": {
"first": "/api/configuration/aaa/local_database/users/103640099357f3b14f0529a",
"href": "/api/configuration/aaa/local_database/users/46785097158061f46c63d0",
"last": "/api/configuration/aaa/local_database/users/46785097158061f46c63d0",
"next": null,
"parent": "/api/configuration/aaa/local_database/users",
"previous": "/api/configuration/aaa/local_database/users/103640099357f3b14f0529a",
"transaction": "/api/transaction"
}
body |
|
Top level element (JSON object) |
Contains the properties of the user. |
|
name |
string |
The username of the user account. |
|
password |
reference |
A reference to a password object. To create or update passwords, see Passwords stored on SPS. |
|
password_created |
integer |
The date when the password of the account was changed in UNIX timestamp format (for example, 1476796261). |
key |
|
string |
Top level element, contains the ID of the user. |
400 |
SemanticError |
You tried to reuse a password object. You can use a password object for only one purpose, that is, you cannot reference a password object twice. |
401 |
Unauthenticated |
The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
403 |
Unauthorized |
The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved. |
404 |
NotFound |
The requested object does not exist. |
409 |
NoTransaction |
No open Transaction is available. You must open a transaction first (for details, see Open a transaction). |