rest/user

rest/user

URL

http://<<ip address>>/rest/user/<username>

Method

POST

Description

Create a new user. First user can be created by everyone and will haveadministratorrole (the rolein the request will be ignored). Subsequent users need to be created by administrator level users.

Required Role

Administrator (first user is allowed for all)

Request

{ "role": "administrator|user", "password": "<password>" }

Response

HTTP201 when successful

Possible Errors

HTTP401 when valid JWT was needed but not supplied

HTTP409 if user already exists

HTTP400 when request was invalid

{ "message": «human readable error» }

Status

Added in 2.5.0

URL

http://<<ip address>>/rest/user/<username>

Method

DELETE

Description

Delete an existing user. You cannot delete yourself, unless you are the last user in the system.

Required Role

Administrator

Response

HTTP204 when successful

Possible Errors

HTTP401 when valid JWT was needed but not supplied

HTTP409 when trying to delete yourself, while there are still other users

Status

Added in 2.5.0

URL

http://<<ip address>>/rest/user/

Method

GET

Description

Get a list of all users

Required Role

Administrator

Response

[ { "username": "<<username>>", "role": "administrator|user" }, ... ]

Possible Errors

HTTP401 when valid JWT was needed but not supplied, or user does not have required role.

Status

Added in 2.5.0