Versions Compared

Key

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

General Information

...

ServiceAPIMethodData ModelsWorkflow
urac/admin/getUseruserGET

...

...

...

Input

...

Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
uId
idQueryYESStringN/A
the user id
User ID


Output

...

Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

Valid Response

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

Invalid Response

Code Block
languagejs
titleError Response Sample
{
    "result_id":false "5c8d0c505653de3985aa0ffd",
    "errorslocked":{ true,
    "username":   "codesjohnd":[411],
        "detailsfirstName":[ "John",
    "lastName": "Doe",
     {"email": "john@localhost.com",
    "ts": 1552747600152,
    "status": "active",
    "codeprofile":411 {},
    "groups": [
          "messageAAAA":"invalid
user id provided"  ],
    "config": {
    }  "packages": {},
     ] "keys": {},
  }
}

...

Code
Description
405Unable to find User. Please try again.
411invalid user id provided

...

Request

Code Block
languagebash
titleCalling Get User API
 > CURL -X GET http://127.0.0.1:4000/urac/admin/getUser?uId=5718a32f0e811ab5a0ca08b3 

Response

Code Block
languagejs
titleGet User API response
{"allowedTenants": []
    "result": true},
    "datatenant": {
        "_id": ObjectId("5d308c68687aaf05b1c240975d9321f8b40e09438afbd0c9"),
 	     "lockedcode": true"test",
	      "usernamepin": "owner",{
	    "password": "$2a$12$geJJfv33wkYIXEAlDkeeuOgiQ6y6MjP/YxbqLdHdDSK7LDG.7n7Pq", 	    "firstNameallowed": "owner",true
	    "lastName": "owner", 	}
   "email": "me@localhost.com",
	 }
  }
 "ts": Double(1563462760715.0),
	}

Invalid Response

Code Block
languagejs
titleError Response Sample
linenumberstrue
collapsetrue
{
    "statusresult": "active"false,
	    "profileerrors": {},
	{
        "groupscodes": [602],
	        "ownerdetails":[
	    ], 	    "config": { 	 {
      "packages": {}, 	        "keyscode":602,
{} 	    }, 	    "tenant": {     "message":"Model error: +  	"id": "5c0e74ba9acc3c5a84a51259",%model_error%"
         	"code": "DBTN"  }
  	},     	"lastLogin": Double(1564068005777.0) ]
    }
}

Response schema

Follow this link to check out the response JSON Schema

SOAJS Error Codes



Code
Description
400

Business logic required data are missing

520

Unable to find user

602Model error: + %model_error%