Get All

General Information


ServiceAPIMethod
urac/admin/allGET


Data Models: UsersGroups

Workflow: Get All Flow

Input


NameSourceMandatoryTypeSpecial FormatDescription
N/AN/AN/AN/AN/AThis api does not need any parameters; it fetches both the users and groups of all the tenants.

 

Output


Valid Response

Valid Response Sample
{
	"result": true,
	"data": {
		"users":[{"..."}],
        "groups":[{"..."}]	
	}
}

 

Invalid Response

Error Response Sample
{
    "result":false,
    "errors":{
        "codes":[405],
        "details":[
            {
                "code":405,
                "message":"Unable to find User. Please try again."
            }
        ]
    }
}



Error Codes


 

Code
Description
405Unable to find User. Please try again.
415Unable to find group.


Example (CURL)


Request

Calling Get All API
 > CURL -X GET http://127.0.0.1:4000/urac/admin/all 

Response

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"
				}
			},
			//...
		]
	}
}