GET/ users

This API returns a collection of users existing within Guardian. This method can only return up to 100 users. Optional page_size and page parameters can be passed in order to limit the results. Results are ordered by fullName and include the user’s Guardian ID which can be used in a subsequent GET request to obtain additional details related to the individual user. For additional parameter information access the users data model section to review field information.

Method

GET

Resource Information

Requires authentication? YES
Response formats JSON

Parameters

Parameter Required Description
page No specifies the page number from where you want to begin accessing records

Filtering

The fields in the table below can be used in the query string of a GET request, for example:

GET https://sandbox.perfectcompliance.com/v1/employees?firstName=John

Currently, it is only possible to query for exact values (no wildcards or partial matches); however, the query criteria is case-insensitive.

Parameter Type Description
emailAddress string User’s email address
firstName string User’s first name
lastName string User’s last name
login string User’s system login name
middleName string User’s middle name
title string User’s title

Example

Request Example

GET https://sandbox.perfectcompliance.com/v1/users?page_size=5&page=1

Response Example

{
    "searchResult": [
        {
            "id": 2312944,
            "firstName": "Susan",
            "title": "Operations HR Manager",
            "lastName": "Anchetta",
            "emailAddress": "testuser1@example.com",
            "fullName": "Anchetta, Susan"
        },
        {
            "id": 2319445,
            "firstName": "Richard",
            "title": "Appstore Approver",
            "lastName": "Barlow",
            "emailAddress": "testuser2@example.com",
            "fullName": "Barlow, Richard"
        },
        {
            "id": 2357414,
            "firstName": "Bob",
            "title": "HR Employee",
            "lastName": "Smith",
            "emailAddress": "testuser3@example.com",
            "fullName": "Smith, Bob "
        },
        {
            "id": 2357422,
            "firstName": "John",
            "title": "Engineering Hr",
            "lastName": "Trammell",
            "emailAddress": "testuser4@example.com",
            "fullName": "Trammell, John"
        },
        {
            "id": 2331272,
            "firstName": "Mollie",
            "title": "Location Manager",
            "lastName": "Wakeham",
            "emailAddress": "testuser5@example.com",
            "fullName": "Wakeham, Mollie"
        }
    ],
    "links": [
        {
            "href": "/v1/users/",
            "rel": "self"
        },
        {
            "href": "/v1/users/?page=1",
            "rel": "first"
        },
        {
            "href": "/v1/users/?page=5",
            "rel": "last"
        },
        {
            "href": "/v1/users/?page=2",
            "rel": "next"
        },
        {
            "href": "/v1/users/?page=5",
            "rel": "previous"
        }
    ]
}

Single Record Request Example

GET https://sandbox.perfectcompliance.com/v1/users/<user_id>

Single Record Response Example

{
    "id": 2312934,
    "workNumber": "6023574400",
    "firstName": "Bhawani",
    "role": "20",
    "title": "HR Manager",
    "homeNumber": "4805465687",
    "lastName": "Charan",
    "workExtension": "12",
    "fullName": "Bhawani Shanker Charan ",
    "middleName": "Shanker",
    "emailAddress": "bshanker@abccorp.com",
    "cellNumber": "9865334512",
    "login": "sV5ijCZ8v",
    "oauthId": "email@exmaple.com",
    "samlId": "saml-id",
    "profileId": "1244987",
    "links": [
        {
            "href": "/v1/users/2312934/",
            "rel": "self"
        }
    ]
}