This controller is responsible for handling user accounts
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type |
|---|---|
| application/json | array of User (JSON) |
| application/xml | list of user (XML) |
GET /manager/v1.0/user/all
Accept: application/json
HTTP/1.1 200 Looks Good
Content-Type: application/json
[ {
"password" : "...",
"username" : "user",
"accountNonLocked" : true,
"id" : "58e3946e0fb4f562d84ba1ad",
"enabled" : true,
"accountNonExpired" : true,
"roles" : [ "[\"ADMIN\",\"USER\"]", "..." ],
"credentialsNonExpired" : true
} ]
Gets the IDs of all the stored users
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type | description |
|---|---|---|
| application/json | array of string (JSON) | a list of all the IDs |
| application/xml | list of string (XML) |
GET /manager/v1.0/user/ids
Accept: application/json
HTTP/1.1 200 Looks Good
Content-Type: application/json
...
| media type | data type |
|---|---|
| application/json | User (JSON) |
| application/xml | user (XML) |
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type |
|---|---|
| application/json | string (JSON) |
| application/xml | string (XML) |
POST /manager/v1.0/user/modify
Content-Type: application/json
Accept: application/json
{
"password" : "...",
"username" : "user",
"accountNonLocked" : true,
"id" : "58e3946e0fb4f562d84ba1ad",
"enabled" : true,
"accountNonExpired" : true,
"roles" : [ "[\"ADMIN\",\"USER\"]", "..." ],
"credentialsNonExpired" : true
}
HTTP/1.1 201 Looks Good
Content-Type: application/json
...
Register new user. A normal user cannot create accounts, only the user with the 'ADMIN' role can do that.
| media type | data type |
|---|---|
| application/json | User (JSON) |
| application/xml | user (XML) |
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | Response on success: The ID of the newly register user. Response on fail: If the user name already exists, or the user name is 'null' or the password is 'null' there will be a 'BadRequestException' |
| application/xml | string (XML) |
POST /manager/v1.0/user/register
Content-Type: application/json
Accept: application/json
{
"password" : "...",
"username" : "user",
"accountNonLocked" : true,
"id" : "58e3946e0fb4f562d84ba1ad",
"enabled" : true,
"accountNonExpired" : true,
"roles" : [ "[\"ADMIN\",\"USER\"]", "..." ],
"credentialsNonExpired" : true
}
HTTP/1.1 201 Looks Good
Content-Type: application/json
...
Deletes a user
| name | type | description |
|---|---|---|
| id | path |
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | The ID of the deleted user |
| application/xml | string (XML) |
DELETE /manager/v1.0/user/{id}
Accept: application/json
HTTP/1.1 204 Looks Good
Content-Type: application/json
...
Gets the user.
| name | type | description |
|---|---|---|
| id | path |
| code | condition |
|---|---|
| 401 | Bad credentials |
| media type | data type | description |
|---|---|---|
| application/json | User (JSON) | the requested user. |
| application/xml | user (XML) |
GET /manager/v1.0/user/{id}
Accept: application/json
HTTP/1.1 200 Looks Good
Content-Type: application/json
{
"password" : "...",
"username" : "user",
"accountNonLocked" : true,
"id" : "58e3946e0fb4f562d84ba1ad",
"enabled" : true,
"accountNonExpired" : true,
"roles" : [ "[\"ADMIN\",\"USER\"]", "..." ],
"credentialsNonExpired" : true
}