Skip to content

Users

Get All Users

GET /api/users

Returns all the Users.

*Requires Admin rights

Get User by ID

GET /api/users/[ID]

Returns the user that corresponds to the user ID.

*Requires Admin rights for other users, Logged in user can get it's own user

Request

Parameter Type Description
ID ID Uuid or the username of the User

Response

User Object

Create User

POST /api/users

Creates a new User.

*Requires Admin rights

Request Body

{
    "username" : "operator",
    "password" : "my password",
    "name" : "Operator 1",
    "roles" : [ 
      "OPERATOR"
    ]
}

Parameter Type Description
username String
password String
name String The name of the User - display name
roles UserRole [] Array of user roles

Response Body

{
    "_id": "5ffb42aad4a3b9150c931a79",
    "username": "operator",
    "name": "Operator 1",
    "type": "NORMAL",
    "roles": [
      "OPERATOR"
    ],
    "settings": {
      "studio": {},
      "browse": {}
    },
    "createdAt": "2020-01-12T17:05:20.616Z",
    "updatedAt": "2020-01-12T17:05:20.616Z"
}

Parameter Value Description
_id Uuid The id of the User
username String
name String The name of the User
roles UserRole [] Array of user roles
createdAt Date Date and time the user was created
updatedAt Date Date and time the user was last updated

Update User

PUT /api/users/[ID]

Updates the User

Request

Parameter Type Description
ID ID Uuid or the username of the User

Request Body

{
    "_id": "5ffb42aad4a3b9150c931a79",
    "username": "operator",
    "name": "Operator 1",
    "type": "NORMAL",
    "roles": [
      "OPERATOR",
      "DESIGNER"
    ],
    "settings": {
      "studio": {},
      "browse": {}
    },
    "createdAt": "2020-01-12T17:05:20.616Z",
    "updatedAt": "2020-01-12T17:05:20.616Z"
}

Response

The updated User object.

Delete User

DELETE /api/users/[ID]

Deletes the user that corresponds to the user ID.

Request

Parameter Type Description
ID ID Uuid or the username of the User

Reset user settings

DELETE /api/users/[ID]/settings

Resets the user settings to the default for the user that corresponds to the user ID.

Request

Parameter Type Description
ID ID Uuid or the name of the User

Response

The response is the updated User object.