# Getting users profiles

# Getting user profiles Admin only

To get the profiles of a user, use the following endpoint:

GET /api/user/{userID}/profiles

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

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

[
    {
        "serial": "string",
        "name": "string",
        "revokeReason": null,
        "revokeTime": null,
        "creationTime": "2023-12-15T15:30:52.768Z",
        "expirationTime": "2023-12-15T15:30:52.768Z",
        "authable": true,
        "lastLogin": "2023-12-15T15:30:52.768Z",
        "deviceType": "string",
        "owner": "string"
    }
]

# Getting user profiles V2 Admin only Paginated Version 2.0

To get the profiles of a user, use the following endpoints:

GET /api/user/{userID}/profiles
POST /api/user/{userID}/profiles

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

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

[
    {
        "serial": "string",
        "name": "string",
        "revokeReason": null,
        "revokeTime": null,
        "creationTime": "2023-12-15T15:30:52.768Z",
        "expirationTime": "2023-12-15T15:30:52.768Z",
        "authable": true,
        "lastLogin": "2023-12-15T15:30:52.768Z",
        "deviceType": "string",
        "owner": "string"
    }
]

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

The following keys are supported for the sort parameter:

Key Description
serial Sort by the serial of the profile
createtime Sort by the creation time of the profile
expirationtime Sort by the expiration time of the profile
lastlogin Sort by the last login time of the profile

The following keys are supported for the filter parameter:

Key Description Example Value
authable Filter by whether the profile is authable or not "true"
minCreated Filter by the minimum creation time of the profile "2023-12-15T18:48:28.775Z"
maxCreated Filter by the maximum creation time of the profile "2023-12-15T18:48:28.775Z"
minLastLogin Filter by the minimum last login time of the profile "2023-12-15T18:48:28.775Z"
maxLastLogin Filter by the maximum last login time of the profile "2023-12-15T18:48:28.775Z"
deviceType Filter by the device type of the profile "Android"
serials Filter by a list of profile serials "1413,212313,3131231"
invalid Return all available profiles even if they are no longer valid "true"