List Users by Id

General Information


ServiceAPIMethod
urac/admin/listUsers/uIdPost


Data Model: Users

Workflow: List Users Flow

Input


Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
startQueryNONumberN/AThe start index of the records to get. Default 0
limitQueryNONumberN/AThe number of records to get. Default 1000
uIdBodyYesarray of stringsArray String With Minimum Items = 1

Array of mongo ids for user records


configQueryNOBooleanN/AN/A

Output


Valid Response

Valid Response Sample
{
	"result": true,
	"data": {
		"..."	
	}
}


Invalid Response

Error Response Sample
{
    "result":false,
    "errors":{
        "codes":[411],
        "details":[
            {
                "code":411,
                "message":"invalid user id provided"
            }
        ]
    }
}



Error Codes



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


Example (CURL)


Request

Calling Get User API
 > CURL -X POST http://127.0.0.1:4000/urac/admin/listUsers/uId --data '{"uId":["5d15e6e280e6f24a6d3589d5"]}'

Response

Get User API response
{
  "result": true,
  "data": [
    {
      "_id": "5d15e6e280e6f24a6d3589d5",
      "username": "john123",
      "firstName": "john",
      "lastName": "doe",
      "email": "john.doe@soajs.org",
      "status": "active",
      "ts": 1561716450696,
      "groups": [],
      "profile": {
        "age": 30
      },
      "config": {
        "packages": {
          "TPROD_EX03": {
            "acl": {
              "example01": {}
            }
          }
        },
        "keys": {},
        "allowedTenants": [
          {
            "tenant": {
              "id": "tenantId",
              "code": "tenantCode",
              "pin": {
                "code": "****",
                "allowed": true
              }
            },
            "groups": [
              "owner"
            ]
          }
        ]
      },
      "tenant": {
        "id": "5718a32f0e811ab5a0ca08b3",
        "code": "test"
      }
    }
  ]
}