Previous Next JavaScript must be enabled to correctly display this content

## Get all users

get

/PASService/rest/services/v1/users

Gets a list of latest 100 users and also define expand attributes to expand a user by it's sub-resources such as security groups.

### Request

Query Parameters

- expand: string
  When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "the name of the child resource". More than one child can be specified using comma as a separator. Example:?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers). More than one child can be specified using comma as a separator. For example: "?expand=Employees,Localizations". Nested children can also be provided following the format: "Child.NestedChild" For example:"?expand=Employees.Managers" If a nested child is provided (Example:Employees.Managers), the missing children will be processed implicitly i.e.,"?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers", which will expand both Employees and Managers.
- limit: integer(int32)
  This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
- offset: integer(int32)
  Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
- q: string
  This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;loc!="NY.

There's no request body for this operation.

Back to Top

### Response

#### 200 Response

This operation fetches a list of users successfully.
Back to Top

### Examples

This example describes how to get all users.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

    curl \
        -X GET \
        -H "Content-Type: application/json" \
        -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
        -L "http://server:port/PASService/rest/services/v1/users"

Example Response Body

The following shows an example of the response body in JSON format:

    {
        "count": 11,
        "offset": 0,
        "limit": 100,
        "users": [
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/qatester3",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue=F",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "23D8108C-A278-4A8C-89FC-C64EB37EF1A1",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "qatester3",
                "client": {
                    "firstName": "User100",
                    "lastName": "User100",
                    "gender": "F",
                    "email": "test@testmail.com",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/Teja",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue=M",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "3557B94F-D78E-4CDC-86D4-DF6E3E82B00D",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "Teja",
                "client": {
                    "firstName": "Teja",
                    "lastName": "Teja",
                    "gender": "M",
                    "email": "Teja@Teja",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/User100",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=01",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "3E5F11F0-CFE9-4A7E-A9B0-2CAEDEF8BBD1",
                "userStatus": "01",
                "localeCode": "01",
                "loginName": "User100",
                "client": {
                    "firstName": "User100",
                    "lastName": "User100",
                    "gender": null,
                    "email": "test@testmail.com",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/abdutest",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue=M",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "42487BAD-AA11-4929-B735-B7D4EFB1D916",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "abdutest",
                "client": {
                    "firstName": "abdutest",
                    "lastName": "abdutest",
                    "gender": "M",
                    "email": "abdultest@gmail.com",
                    "primaryCompany": "AbdulTestCompany"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/qatester2",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=05",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue= ",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "4D63999D-665A-450E-AE7E-6BF440E4DDA0",
                "userStatus": "01",
                "localeCode": "05",
                "loginName": "qatester2",
                "client": {
                    "firstName": "qatester2",
                    "lastName": "qatester2",
                    "gender": " ",
                    "email": "",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/bhagyat",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue=F",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "64BD34FB-C80D-48F5-87DB-F14BD0692F8E",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "bhagyat",
                "client": {
                    "firstName": "bhagyat",
                    "lastName": "bhagyat",
                    "gender": "F",
                    "email": "",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/User200",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "6A620EA0-7883-4395-81E5-9030CEFC20AB",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "User200",
                "client": {
                    "firstName": "User200",
                    "lastName": "User200",
                    "gender": null,
                    "email": "test@testmail.com",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/qatester4",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=01",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=ClientSex&codeValue= ",
                        "rel": "codes/Gender",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "81A696BF-A75C-4394-90DD-191370933E14",
                "userStatus": "01",
                "localeCode": "01",
                "loginName": "qatester4",
                "client": {
                    "firstName": "qatester4",
                    "lastName": "qatester4",
                    "gender": " ",
                    "email": "",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/qatester1",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "C2544D87-D539-4C30-9FF9-75CB637836E7",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "qatester1",
                "client": {
                    "firstName": "qatester1",
                    "lastName": "qatester1",
                    "gender": "",
                    "email": "",
                    "primaryCompany": "Prototype"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/qatester",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "EB87F057-80DD-4230-BCF4-63F670B88C9C",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "qatester",
                "client": {
                    "firstName": "qatester",
                    "lastName": "qatester",
                    "gender": "",
                    "email": "",
                    "primaryCompany": "Alamere Insurance"
                }
            },
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/users/vijay9",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=UserStatus&codeValue=01",
                        "rel": "codes/userStatus",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Locale&codeValue=00",
                        "rel": "codes/localeCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "clientGuid": "FC00D0BD-E880-4898-A57F-0919D170BE28",
                "userStatus": "01",
                "localeCode": "00",
                "loginName": "vijay9",
                "client": {
                    "firstName": "vijay9",
                    "lastName": "vijay9",
                    "gender": "",
                    "email": "",
                    "primaryCompany": "Prototype"
                }
            }
        ]
    }

Back to Top