-
Notifications
You must be signed in to change notification settings - Fork 10
REST: Users and groups management
bugzmanov edited this page Aug 2, 2012
·
14 revisions
Path: /rest/users
Type: GET
Example response:
[
{
"username": "john",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Developer"
},
{
"username": "jane",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"jobTitle": "Jane Doe"
}
]
Path: /rest/users
Type: POST
Input data:
{
"username": "jane",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"jobTitle": "Jane Doe",
"password": "qwerty",
"groups": ["group1", "group2"]
}
Entry name | Type | Mandatory | Description |
---|---|---|---|
username | String | Y | User name |
String | Y | User email | |
firstName | String | Y | User first name |
lastName | String | Y | User last name |
jobTitle | String | N | User job title |
password | String | Y | User password |
groups | Array of string | N | List of existing groups to assign to a user |
Example response
Success
{ "result": { "username":"jane1", "email":"[email protected]", "firstName":"Jane", "lastName":"Doe", "jobTitle":"Jane Doe" }, "isSuccess":true }
В
Error
**
**SeeВ [Common result object][1]
В
Path: /rest/users/{username}
Type: DELETE
Results:
**Success:В **Deleted user. SeeВ [Create user][2]
Failure: SeeВ [Common result object][3]
Path:В /rest/users/{username}
Type:В PUT
Input data:
{ "email": "[email protected]", "firstName": "Jane", "lastName": "Doe", "jobTitle": "Jane Doe", "groups": ["group1", "group2"] }