Skip to main content

user

The user command lets Admin users manage user accounts in DisplayNet.

info

All user subcommands require the Admin role, except invalidatemylogintoken, which is available to any authenticated user.

Command TypeDisplayNet
Minimum Version2.x.x

Usage

user add -username <username> -password <password> [-role <role>] [-fullname <fullname>]
user update -username <username> [-password <password>] [-role <role>] [-fullname <fullname>]
user delete -username <username>
user password <username> <newpassword>
user list
user invalidatelogintoken -username <username>
user invalidatemylogintoken
user invalidatealllogintokens

Subcommands

SubcommandDescription
add (alias create)Adds a new user. Usernames must be 5 to 15 characters and are stored lowercase.
updateUpdates an existing user. Only the provided parameters are changed.
deleteDeletes an existing user.
passwordChanges another user's password and invalidates all of their login tokens.
listReturns all user accounts.
invalidatelogintokenInvalidates a specific user's login token, forcing re-authentication with credentials.
invalidatemylogintokenInvalidates the current user's own login token. Does not require Admin.
invalidatealllogintokensInvalidates all active login tokens for all users.
Protected accounts

The DisplayNet account password cannot be changed. The DNAdmin role cannot be changed, and the DNAdmin and DisplayNet accounts cannot be deleted. Users cannot change their own role or delete their own account.

Arguments

ArgumentRequiredDescription
-usernameadd, update, delete, invalidatelogintokenThe target username.
-passwordaddThe password for the user.
-roleNoThe user's role: Admin or User. Defaults to User.
-fullnameNoThe user's full name. Supports spaces, e.g. -fullname John Smith.

Examples

Add an operator account
user add -username frontdesk -password s3cret -role User -fullname Front Desk
Promote a user to Admin
user update -username frontdesk -role Admin
Reset a user's password (Admin)
user password frontdesk newpass123

Return value

user list
{
"status": "SUCCESS",
"request_id": null,
"result": {
"AuthorizedUsers": [
{
"UserName": "DisplayNet",
"UserRole": "User",
"FullName": "DisplayNet"
},
{
"UserName": "DNAdmin",
"UserRole": "Admin",
"FullName": "DNAdmin"
}
]
},
"error": null
}

REST API

Endpoint typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleAdmin
SubcommandOperationParameters
adduser_add[args]*
deleteuser_delete[args]*
invalidatealllogintokensuser_invalidatealllogintokens
invalidatelogintokenuser_invalidatelogintoken[args]*
listuser_list
passworduser_passwordusername new_password
updateuser_update[args]*

A parameter in brackets is optional. A parameter marked * takes the remainder of the command line as one string. Pass the text exactly as you would type it on the TCI interface.

See also