# Getting guest accounts

# Getting guest accounts Admin only Paginated

To get the guest accounts of a realm, use one of the following endpoints:

GET /api/guest-accounts
POST /api/guest-accounts

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

[
    {
        "id": "string",
        "name": "string",
        "creationDate": "2023-12-15T15:30:52.768Z",
        "expirationDate": "2023-12-15T15:30:52.768Z",
        "note": "string" | null,
        "profileLimit": 0 | null,
        "revoked": false,
        "activeProfileCount": 1
    }
]

The search parameter for this paginated endpoint is a string that will be used to search for guest accounts with a name that contains the search string.

The following keys are supported for the sort parameter:

Key Description
name Sort by the name of the guest account
createtime Sort by the creation date of the guest account
expirationtime Sort by the expiration date of the guest account
profilelimit Sort by the profile limit of the guest account

The following keys are supported for the filter parameter:

Key Description Example Value
invalid Filter by whether the guest account is revoked or not "true"
minCreateTime Filter by the minimum creation date of the guest account "2023-12-15T18:48:28.775Z"
maxCreateTime Filter by the maximum creation date of the guest account "2023-12-15T18:48:28.775Z"
minExpirationTime Filter by the minimum expiration date of the guest account "2023-12-15T18:48:28.775Z"
maxExpirationTime Filter by the maximum expiration date of the guest account "2023-12-15T18:48:28.775Z"

# Getting a specific guest account Admin only

To get a specific guest account by its ID, use the following endpoint:

GET /api/guest-accounts/{guestAccountId}

With {guestAccountId} being the ID of the guest account to retrieve.

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

{
    "id": "string",
    "name": "string",
    "creationDate": "2023-12-15T15:30:52.768Z",
    "expirationDate": "2023-12-15T15:30:52.768Z",
    "note": "string" | null,
    "profileLimit": 0 | null,
    "revoked": false,
    "activeProfileCount": 1
}

# Getting the guest account token Admin only

The guest account token is a cryotographic token that API clients can use to create and download profiles under a guest account without requiring authentication. To get the guest account token for a specific guest account by its ID, use the following endpoint:

GET https://auth.easyroam.de/api/guest-token/{guestAccountId}

With {guestAccountId} being the ID of the guest account to retrieve the token for.

On success the response will be the default API response with the data being a string representing the guest account token.