Search User By User Attribute
API to search and fetch the user list using user's attributes.
Resource Informations
Name | Value |
---|---|
Requires authentication? | Yes |
Rate limited? | No |
Request
Request headers
Key | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/json |
HTTP request URL for SSMS
GET https://{tenantId}.{hostname}/digitanium/v4/users/search/attribute?key={attribute_name}&value={attribute_value}
HTTP request URL for SHIFT
GET https://{hostname}/auth/realms/{tenantId}/v3_user/search/attribute?key={attribute_name}&value={attribute_value}
note
API requests must be made over https. Calls made over plain http will fail.
Parameters
Parameter Name | Type | Description |
---|---|---|
Key | String | Provide Attribute Name |
Value | String | Provide Attribute value to search |
important
In the value column while searching the user with string values make sure the special character (+) is replaced with (%2b). (Example: On using the phone number (+123456) to search, the user should use this format (%2b123456).
Request body
No request body fields required.
Response
Field Name | Type | Description |
---|---|---|
message | String | Message explains result of the API call. Refer Response status Information for details. |
status | String | The status of the API call. Refer Response status Information for details. |
subSystem | Integer | subSystem categorizes the type of API that has been called. Refer Subsystem details for details. |
data | Object | List of all User details for the given attributes. Refer Data Representation for details. |
Sample Response
{
"message": "Users fetched successfully",
"status": "Success",
"subSystem": 5,
"data": [{
"username": "demotest",
"id": "89df9532-0990-46eb-93f3-920137063ab9",
"email": "testemail@email.com",
"firstName": "demo",
"lastName": "user",
"enabled": true,
"emailVerified": false,
"attributes": {
"attribute1": ["value1", "value2"],
"attribute2": ["value1"]
},
"requiredActions": [],
"admin": false
}]
}
Data Representation
Field Name | Type | Description |
---|---|---|
username | String | Unique username of the user |
id | String | Unique system UUID, which will be generated automatically. |
String | Unique email corresponding to the user | |
firstName | String | First name of user |
lastName | String | Last name of user |
enabled | Boolean | Indicates whether the user is enabled or not. true = enable & false = disable, Defaults to true. |
emailVerified | Boolean | Is this enabled or not? true = enable & false = disable, Defaults to true. |
attributes | List | Based on the user requirement the user attributes can be updated. User can add any customized attribute in form of key value pair. |
requiredActions | List(String) | List the actions which need to be performed during initial login. Refer Required Actions to know the supported actions. |
admin | Boolean | If set to true the user has admin role mapped, else not. |
Response Status Information
Status Code | Status | Message |
---|---|---|
200 | Success | Users fetched successfully. |
400 | GENERAL ERROR | Failed to get userCaused by null. |
401 | Unauthorized | HTTP 401 Unauthorized. |
404 | USER_NOT_FOUND | User does not exist. |