Summary:
List detailed user information, modify parameters of a user, and delete a user. Note, from Entuity v21.0 upwards, you can also manage user details in config sets (see Config Sets - User Details).
URL:
http(s)://{server hostname}/api/users/{userID}
Methods summary
- GET Method - lists detailed user info.
- PUT Method - modifies parameters of a user.
- DELETE Method - deletes user.
GET Method detail
Returns detailed information about the given user.
Response:
User info structure with the following format:
Name | Description |
---|---|
id |
user ID. |
name |
name of the user. |
lockAttempts |
number of failed login attempts before locking the account. Value -1 to disable. |
lockDurationFailedAttempts |
duration (minutes) the account is locked for after reaching maximum failed attempts. |
expiryDays |
Unix timestamp of the date on which the account will expire. Value -1 to disable. |
timeoutMinutes |
number of minutes after which session becomes inactive. Value -1 to disable. |
pwChangeDays |
days to password change. Value -1 to disable. |
pwChangeNoticePeriod |
number of days to display a warning before a password change is required. Value 0 to disable. |
forcePWChange |
whether the user needs to change their password. |
groups |
list of groups that this user is a member of. |
locked |
“locked” status of the user. |
admin |
if the user is admin. |
expired |
if the user account expired. |
overrideGlobalUserSettings |
if false, the user settings will always match the global user settings. Must be set to true to override global user settings. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/users/6?media=json
OUTPUT
{
"id" : 6,
"name" : "John",
"lockAttempts" : 3,
"lockDurationFailedAttempts" : 5,
"expiryDays" : 1561814580,
"timeoutMinutes" : 20,
"pwChangeDays" : 90,
"forcePWChange" : false,
"passwordExpiryNoticePeriod" : 5,
"groups" : [ "All Users" ],
"overrideGlobalUserSettings" : false,
"locked" : false,
"admin" : false
"expired" : false,
}
INPUT
curl -u admin:admin https://localhost/api/users/6?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userAccountInfo id="6" admin="false" locked="false" expired="false">
<name>John</name>
<lockDurationFailedAttempts>5</lockDurationFailedAttempts>
<forcePWChange>false</forcePWChange>
<overrideGlobalUserSettings>true</overrideGlobalUserSettings>
<passwordExpiryNoticePeriod>5</passwordExpiryNoticePeriod>
<lockAttempts>3</lockAttempts>
<expiryDays>1561814580</expiryDays>
<timeoutMinutes>20</timeoutMinutes>
<pwChangeDays>90</pwChangeDays>
<groups>All Users</groups>
</userAccountInfo>
PUT Method detail
Modifies parameters of a user.
Request:
Name | Description |
---|---|
lockAttempts |
number of failed login attempts before locking the account. Value -1 to disable. |
lockDurationFailedAttempts |
duration (minutes) the account is locked for after reaching maximum failed attempts. |
expiryDays |
Unix timestamp of the date on which the account will expire. Value -1 to disable. |
timeoutMinutes |
number of minutes after which session becomes inactive. Value -1 to disable. |
pwChangeDays |
days to password change. Value -1 to disable. |
pwChangeNoticePeriod |
number of days to display a warning before a password change is required. Value 0 to disable. |
forcePWChange |
whether the user needs to change their password. |
groups |
list of groups that this user is a member of. |
overrideGlobalUserSettings |
if false, the user settings will always match the global user settings. Must be set to true to override global user settings. |
Response:
Detailed information about the user after changes, as the 'GET Method' above would return it.
Examples:
INPUT
curl -u admin:admin https://localhost/api/users/6?media=json -X PUT -H "content-type:application/json" -d \
'{
"lockAttempts" : 3,
"expiryDays" : 1579800600,
}'
OUTPUT
{
"id" : 6,
"name" : "John",
"lockAttempts" : 3,
"lockDurationFailedAttempts" : 5,
"expiryDays" : 1579800600,
"timeoutMinutes": 20,
"pwChangeDays" : 90,
"forcePWChange" : false,
"passwordExpiryNoticePeriod" : 5,
"groups" : [ “All Users" ],
"overrideGlobalUserSettings" : true,
"locked" : false,
"expired" : true
"admin" : false,
}
INPUT
curl -u admin:admin https://localhost/api/users/6?media=xml -X PUT -H "content-type:application/xml" -d \
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userAccountInfo expired="false" locked="false" admin="false">
<lockAttempts>3</lockAttempts>
<expiryDays>1579800600</expiryDays>
</userAccountInfo>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userAccountInfo id="6" admin="false" locked="false" expired="false" id="19" xmlns:ns2="https://www.entuity.com/schemas/webUI">
<name>John</name>
<lockDurationFailedAttempts>5</lockDurationFailedAttempts>
<forcePWChange>false</forcePWChange>
<overrideGlobalUserSettings>true</overrideGlobalUserSettings>
<passwordExpiryNoticePeriod>5</passwordExpiryNoticePeriod>
<lockAttempts>3</lockAttempts>
<expiryDays>1579800600</expiryDays>
<timeoutMinutes>20</timeoutMinutes>
<pwChangeDays>90</pwChangeDays>
<groups>All Users</groups>
</userAccountInfo>
DELETE Method detail
Deletes user account.
Response:
The updated list of users, as the Users - GET Method would return it.
Examples:
INPUT
curl -u admin:admin https://localhost/api/users/6?media=json -X DELETE
OUTPUT
{
"items": [ {
"serverId": "ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a",
"id": "3",
"name": "admin"
} ],
"count": 1
}
INPUT
curl -u admin:admin https://localhost/api/users/6?media=xml -X DELETE
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="1">
<item xsi:type="namedItem" name="admin" id="3" serverId="ee934fe2-1f4d-4f1e-a0b5-a87b261eb30a" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"/>
</items>
Comments
0 comments
Please sign in to leave a comment.