User Management
URL
GET /cyber-ai/users/ GET /cyber-ai/users/{username}
Request Data
none
Response – for all users, it returns a list, while for single user it returns single object
[ { "username": "admin", "pwd": "*****", "role": "Admin" } ]
Response codes:
Status
Description
200
Success
404
Not found
URL
POST /cyber-ai/users
Request data
{ "username": "johns", "pwd": "drowssap", "role": "User" }
Supported Roles: Admin/User
Response codes:
Status
Description
201
Created
409
Conflicted
Users can change their own password only. Admins can modify both passwords and roles.
URL
PATCH /cyber-ai/users/{username}
Request data – just pwd and/or role can be used in the request
{
"pwd"
:"drowssap"
, }Response
none
Response codes:
Status
Description
200
Success
400
Bad request
403
Forbidden
404
Not found
URL
DELETE /cyber-ai/users/{username}
Request data
none
Response
none
Response codes:
Status
Description
204
No content (success)
403
Forbidden
404
Not found