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
Header Parameters
Back to Top

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.
Back to Top

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"
                }
            ]
        }
    ]
}


Back to Top