General Information
...
Service | API | Method |
---|
urac | /admin/all | GET |
Data Models: Users, Groups
Workflow: %Link to Architecture Page% Get All Flow
Input
...
Name | Source | Mandatory | Type | Special Format | Description |
---|
N/A | N/A | N/A | N/A | N/A | This api does not need any parameters; it fetches both the users and groups of all the tenants. |
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": {
"users":[{"..."}],
"groups":[{"..."}]
}
} |
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
|
{
"result":false,
"errors":{
"codes":[405],
"details":[
{
"code":405,
"message":"Unable to find User. Please try again."
}
]
}
} |
Error Codes
| |
---|
405 | Unable to find User. Please try again. |
415 | Unable to find group. |
Example (CURL)
...
Request
Code Block |
---|
language | bash |
---|
title | Calling YOUR Get All API |
---|
|
> CURL -X GET http://127.0.0.1:4000/urac/admin/all |
Response
Code Block |
---|
language | js |
---|
title | YOUR Get All API response |
---|
|
{
"result": true,
"data": {
"users": [{
"_id": "571a2a0e8cc861b98a0b9467",
"locked": true,
"username": "owner",
"firstName": "owner",
"lastName": "owner",
"email": "owner@soajs.org",
"ts": 1461332494711,
"status": "active",
"profile": {},
"groups": [
"owner"
],
"config": {
"packages": {},
"keys": {}
},
"tenant": {
"id": "5551aca9e179c39b760f7a1a",
"code": "DBTN"
}
},
//...
],
"groups": [{
"_id": "571a2a0e8cc861b98a0b9469",
"locked": true,
"code": "owner",
"name": "Owner Group",
"description": "this is the owner group that owns the dashboard",
"tenant": {
"id": "5551aca9e179c39b760f7a1a",
"code": "DBTN"
}
},
//...
]
}
} |