General Information
...
Service | API | Method | Data Model | Workflow |
---|---|---|---|---|
urac | /admin/ |
users/ids | GET |
...
...
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
idS | Query |
YES | String | N/A |
Users IDs | ||
config | Query | NO |
Object | N/A |
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 | ||||
---|---|---|---|---|
| ||||
{
"result": true,
"data": [{
"..."
},
// ...
]
} |
Invalid Response
...
language | js |
---|---|
title | Error Response Sample |
...
Configuration Object |
Output
...
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ result: true, data: [ { "_id": "5c8d0c505653de3985aa0ffd", "locked": true, "username": "johnd", "firstName": "John", "lastName": "codesDoe":[400], "detailsemail":[ "john@localhost.com", "ts": 1552747600152, { "status": "active", "code"profile":400 {}, "groups": [ "message":AAAA"Database connection error" ], "config": }{ ] "packages": {}, } } |
...
Code
...
Description
...
Request
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X GET http://127.0.0.1:4000/urac/admin/listUsers?tId=5551aca9e179c39b760f7a1a |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "result"keys": true{}, "data": [ { "_id": "571a2a0e8cc861b98a0b9467", "locked": true, "usernameallowedTenants": "owner", "firstName": "owner", "lastName": "owner", "email": "owner@soajs.org", "ts": 1461332494711, "status": "active", "profile": {}, "groups": ["owner"], [] }, "tenant": { "id": "5551aca9e179c39b760f7a1a", "code": "DBTN" } }, { "_ "id": ObjectId("5d308c68687aaf05b1c240975d9321f8b40e09438afbd0c9"), "lockedcode": true"test", "usernamepin": "owner",{ "firstNameallowed": "owner",true "lastName": "owner",} } "email": "me@localhost.com", } ] } |
Invalid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "tsresult": Double(1563462760715.0), false, "statuserrors":{ "active", "profilecodes": {}[602], "groupsdetails": [ "owner"{ ], "tenantcode":602, { "id": "5c0e74ba9acc3c5a84a51259",message":"Model error: + %model_error%" } "code": "DBTN" ] }, } } ] }} |
Response schema
Follow this link to check out the response JSON Schema
SOAJS Error Codes
Code | Description |
---|---|
400 | Business logic required data are missing |
602 | Model error: + %model_error% |