# Getting users

# Getting users Admin only Paginated

To get users of the current realm, use the following endpoint:

GET /api/user

On success the response will be the default paginated API response with the data being a data array of users.

The user entities will be in the following format:

[
    {
      "userID": "string",
      "pairwiseID": "string",
      "email": "string",
      "locked": true,
      "creationTime": "2023-12-15T18:48:28.775Z",
      "realmID": "string",
      "profileOverride": 0,
      "maxProfiles": 0,
      "profileCount": 0,
      "blacklisted": false,
      "blacklistDate": null,
      "lockDate": null
    }
]

The search parameter for this paginated endpoint is a string that will be used to search for users with a pairwiseID that contains the search string.

The following keys are supported for the sort parameter:

Key Description
pairwiseid Sort by the pairwise ID of the user
created Sort by the creation time of the user
profilecount Sort by the number of profiles of the user
lockDate Sort by the lock date of the user
blacklistDate Sort by the blacklist date of the user

The following keys are supported for the filter parameter:

Key Description Example Value
blacklisted Filter by whether the user is blacklisted or not "True"
locked Filter by whether the user is locked or not "True"
minProfileCount Filter by the minimum number of profiles the user has "5"
maxProfileCount Filter by the maximum number of profiles the user has "5"
minCreated Filter by the minimum creation time of the user "2023-12-15T18:48:28.775Z"
maxCreated Filter by the maximum creation time of the user "2023-12-15T18:48:28.775Z"
minLockDate Filter by the minimum lock date of the user. Users that are not locked will not be returned by the API "2023-12-15T18:48:28.775Z"
maxLockDate Filter by the maximum lock date of the user. Users that are not locked will not be returned by the API "2023-12-15T18:48:28.775Z"
minBlacklistDate Filter by the minimum blacklist date of the user. Users that are not blacklisted will not be returned by the API "2023-12-15T18:48:28.775Z"
maxBlacklistDate Filter by the maximum blacklist date of the user. Users that are not blacklisted will not be returned by the API "2023-12-15T18:48:28.775Z"
ids Filter by a list of user IDs "1,2,3"

# Getting a specific user

To get a specific user of the current realm, use the following endpoint:

GET /api/user/{userID}

With {userID} being the ID of the user to get.

On success the response will be the default API response with the data being a user entity in the following format:

{
  "userID": "string",
  "pairwiseID": "string",
  "email": "string",
  "locked": true,
  "creationTime": "2023-12-15T18:48:28.775Z",
  "realmID": "string",
  "profileOverride": 0,
  "maxProfiles": 0,
  "profileCount": 0,
  "blacklisted": false,
  "blacklistDate": null,
  "lockDate": null
}