Search for a user
This API is used to search for a user using filter conditions.
URL: /user-search
Type: POST
Parameters
| Param Type | Name | Description | Field Type |
|---|---|---|---|
Header |
sessionId** (or) Token** | Use either Session Id or Token received after login. | String |
Query |
gwkey | Tenant Key. Needed only in case of multi-tenant installations. | String |
Query |
gwsource** | Source from which the request is triggered (for example, web, external). | String |
Payload |
filterValue | Input filter value string to filter the role. | String |
Payload |
sortColumn | Column by which the output has to be sorted. | String |
Payload |
startIndex | Start index to show in output in case if there are more than one matching records. | Integer |
Payload |
maxSize | The number of records to return in a response. maxSize is starting from the start index | Integer |
Payload |
sortOrder | Order of sorting. Possible values are asc and desc | String |
** - Mandatory value
Possible Response Message and Code
| HTTP Code | Description | Response Message |
|---|---|---|
| 404 | Not Found | No matching records found. |
| 200 | OK | Matching results found for the given input. |
Sample Request/Response
Use Case
Search for use with name appviewx_user1.
Request URL
https://appviewxapi.com/avxapi/ user- search?gwkey=f000ca01&gwsource=external
Request Payload
{
"payload": {
"startIndex" : 1,
"maxSize" : 2,
"sortColumn" : "loginName",
"sortOrder" :"asc",
"filterValue" : "appviewx_user1"
}
}
Response
{
"response": {
"data": [
{
"loginName": "appviewx_user1",
"firstName": "Appviewx",
"lastName": "user1",
"comment": Appviewx login user,
"email": "",
"mobile": "",
"preferredContactMode": "",
"isExternalAuth": "N",
"state": "A",
"roles": null,
"swImages": null,
"authenticationMode": "Internal",
"available": "Active",
"lastLogIn": "Online",
"sessionIds": null,
"aclIdentifiers": null,
"tenantId": null,
"availableIncorrectAttempt": 10,
"lastLoginTimestamp": 1585669200198,
"adUserGroups": null,
"sso": false,
"date": "2020-04-13 12:05:09",
"_id": "5d258291d7f495bb31691fc4",
"userGroups": null,
"_keywords": null,
"isSSO": false
}
],
"totalRecords": 1,
"obtainedRecords": 1,
"obtainedRecordRange": {
"start": 1,
"end": 1
}
},
"message": "Matching results found for the given input.",
"appStatusCode": null,
"tags": null,
"headers": null
}