Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Information

...

ServiceAPIMethod
urac/account/getUserGET


Data Model: %Link to Data Model% Users

Workflow: %Link to Architecture Page% Get User Account Flow

Input

...

Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
 
username
Body
QueryYESStringN/A
 
The User Name

 


Output

...

Valid Response

Code Block
languagejs
titleValid Response Sample
{
	"result": true,
	"data": {
		"..."	
	}
}

...


Invalid Response

Code Block
languagejs
titleError Response Sample
{
    "result":false,
    "errors":{
        "codes":[400405],
        "details":[
            {
                "code":400405,
                "message":"Problem with the provided passwordUnable to find User. Please try again."
            }
        ]
    }
}



Error Codes

 



Code
Description
400Database Error
405Unable to find User. Please try again.


Example (CURL)

...

Request

Code Block
languagebash
titleCalling YOUR Get User API
 > CURL -X POSTGET http://127.0.0.1:4000/.../urac/account/getUser?username=john 

Response

Code Block
languagejs
titleYOUR Get User API response
{
	"result": true,
	"data": {
		"_id": "57063608622c47b5c097d19b571a2a0e8cc861b98a0b9467",
		"locked": true,
		"username": "john",
		"firstName": "john",
		"lastName": "john",
		"email"...": "john@soajs.org",
		"ts": 1461332494711,
		"status": "active",
		"profile": {},
		"groups": ["administrator"],
		"config": {
			"packages": {},
			"keys": {}
		},
		"tenant": {
			"id": "5551aca9e179c39b760f7a1a",
			"code": "DBTN"
		}
	}
}