General Information
...
Service | API | Method |
---|
urac | /admin/listUsers | GET |
Data Model: %Link to Data Model% Users
Workflow: %Link to Architecture Page% List Users Flow
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
BodyYES | ...
If set, the api will return the users of a specific tenant; else the api returns all the users in the database |
start | Query | NO | Number | N/A | The start index of the records to get. Default 0 |
limit | Query | NO | Number | N/A | The number of records to get. Default 1000 |
keywords | Query||Body | NO | String |
| applied towards let rePattern = new RegExp(req.soajs.inputmaskData['keywords'], 'i'); condition['$or'] = [ {"email": rePattern}, {"username": rePattern}, {"firstName": rePattern}, {"lastName": rePattern} ]; |
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": [{
"..."
},
} // ...
]
} |
...
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
|
{
"result":false,
"errors":{
"codes":[400],
"details":[
{
"code":400,
"message":"ProblemDatabase with the provided passwordconnection error"
}
]
}
} |
Error Codes
...
Request
Code Block |
---|
language | bash |
---|
title | Calling YOUR List Users API |
---|
|
> CURL -X POSTGET http://127.0.0.1:4000/...urac/admin/listUsers?tId=5551aca9e179c39b760f7a1a |
Response
Code Block |
---|
language | js |
---|
title | YOUR List Users API response |
---|
|
{
"result": true,
"data": [
{
"_id": "571a2a0e8cc861b98a0b9467",
"locked": true,
"username": "owner",
"57063608622c47b5c097d19b "firstName": "owner",
"lastName": "owner",
"..."
}email": "owner@soajs.org",
"ts": 1461332494711,
"status": "active",
"profile": {},
"groups": ["owner"],
"tenant": {
"id": "5551aca9e179c39b760f7a1a",
"code": "DBTN"
}
}
]
} |