Search users
get
/rest/users
Searches users using query parameters. At least one anchor criterion is required: userId, firstName, lastName, primaryCompany, or role. gender, email, locale, and status are secondary filters. The role parameter may be repeated.
Request
Query Parameters
-
email:
-
firstName:
-
gender:
-
lastName:
-
locale:
-
primaryCompany:
-
role:
Repeat the parameter to filter by multiple roles, for example role=Prototype%20Super&role=Prototype%20Tester.
-
status:
-
userId:
Exact or business-layer-supported user identifier criterion.
Header Parameters
-
Password(required):
Application password.
-
PasswordType(required):
Password type (case-sensitive). Use PasswordText. PasswordDigest requires webservice.allowHashedPassword=Yes.
-
Username(required):
Application username.
Response
200 Response
Matching users.
400 Response
No anchor search criterion or invalid search data.
401 Response
Authentication failed.
403 Response
Authorization failed for UserService/searchUser.
404 Response
No matching users were found.
500 Response
Uncatalogued business or internal processing error.
Examples
This example describes how to search users.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl \
-X GET \
-H "Accept: application/json" \
-u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-L "http://server:port/PASJava/rest/users?userId={{userId}}"
Example Response Body
The following shows an example of the response body in JSON format:
{
"users": [
{
"userId": "REST_P2_DWILSON_1789483360655",
"firstName": "Daniel",
"lastName": "Wilson",
"gender": "M",
"email": "daniel.wilson@example.com",
"primaryCompany": "Prototype",
"locale": "en-US",
"status": "Active",
"roles": [
{
"roleName": "Prototype Analyst",
"effectiveFrom": "2015-07-31T00:00:00.000Z",
"effectiveTo": "2036-11-18T00:00:00.000Z"
},
{
"roleName": "Prototype Super",
"effectiveFrom": "2015-07-31T00:00:00.000Z",
"effectiveTo": "2036-11-18T00:00:00.000Z"
}
]
}
]
}