# Getting profiles

# Getting active profiles Admin only Paginated

To get active profiles of the current realm, use the following endpoint:

GET /api/profiles

On success the response will be the default API response with the data being a data array of profiles. The profile entities will be in the following format:

[
    {
        "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 sppoorted 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"

# Getting a specific profile Admin only

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

GET /api/profiles/{serial}

With {serial} being the serial of the profile to get.

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

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