List Users by Id
General Information
Service | API | Method |
---|---|---|
urac | /admin/listUsers/uId | Post |
Data Model:Â Users
Workflow: List Users Flow
Input
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|---|---|---|---|---|
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 |
uId | Body | Yes | array of strings | Array String With Minimum Items = 1 | Array of mongo ids for user records |
config | Query | NO | Boolean | N/A | N/A |
Output
Valid Response
Valid Response Sample
{ "result": true, "data": { "..." } }
Invalid Response
Error Response Sample
{ "result":false, "errors":{ "codes":[411], "details":[ { "code":411, "message":"invalid user id provided" } ] } }
Error Codes
Code | Description |
---|---|
405 | Unable to find User. Please try again. |
411 | invalid user id provided |
Example (CURL)
Request
Calling Get User API
 > CURL -X POST http://127.0.0.1:4000/urac/admin/listUsers/uId --data '{"uId":["5d15e6e280e6f24a6d3589d5"]}'
Response
Get User API response
{ "result": true, "data": [ { "_id": "5d15e6e280e6f24a6d3589d5", "username": "john123", "firstName": "john", "lastName": "doe", "email": "john.doe@soajs.org", "status": "active", "ts": 1561716450696, "groups": [], "profile": { "age": 30 }, "config": { "packages": { "TPROD_EX03": { "acl": { "example01": {} } } }, "keys": {}, "allowedTenants": [ { "tenant": { "id": "tenantId", "code": "tenantCode", "pin": { "code": "****", "allowed": true } }, "groups": [ "owner" ] } ] }, "tenant": { "id": "5718a32f0e811ab5a0ca08b3", "code": "test" } } ] }