Added API getUserByName()

Tests and doc included
This commit is contained in:
jf-guillou
2016-01-25 10:05:44 +01:00
parent 051bf1c9db
commit 63a2861476
3 changed files with 61 additions and 0 deletions

View File

@@ -113,6 +113,48 @@ Response example:
}
```
## getUserByName
- Purpose: **Get user information**
- Parameters:
- **username** (string, required)
- Result on success: **user properties**
- Result on failure: **null**
Request example:
```json
{
"jsonrpc": "2.0",
"method": "getUserByName",
"id": 1769674782,
"params": {
"username": "biloute"
}
}
```
Response example:
```json
{
"jsonrpc": "2.0",
"id": 1769674782,
"result": {
"id": "1",
"username": "biloute",
"password": "$2y$10$dRs6pPoBu935RpmsrhmbjevJH5MgZ7Kr9QrnVINwwyZ3.MOwqg.0m",
"role": "app-user",
"is_ldap_user": "0",
"name": "",
"email": "",
"google_id": null,
"github_id": null,
"notifications_enabled": "0"
}
}
```
## getAllUsers
- Purpose: **Get all available users**