---
title: "Lists a collection of active sessions."
method: GET
path: "/session"
---

# Lists a collection of active sessions.

`GET /session`

## Request

- Base URL: `https://api.sandbox-gameye.gameye.net`
- URL: `https://api.sandbox-gameye.gameye.net/session`
- Auth: HTTP bearer

Lists all of the active sessions that are tied to your API token. Note that it only returns sessions that are active. Those that have already been  stopped, will not be included.

## Query parameters

- `all` boolean
- `location` string
- `image` string
- `tag` string
- `host` string
- `playerCount` object: Filter results by player count. The following keys are available: - 'lt': Less than - 'gt': Greater than Combined with the 'location' filter above, this would for example allow users to search for specific sessions within a specific region and with less than X amount of players which is good to have for backfill purposes.
- `filter` object: A list or record of tags to filter a list of sessions on. If none of the sessions meet the provided filter criteria, naturally an empty list of sessions is returned.

## Response `200`

Successfully looked up all of the active sessions that are tied to your API token.

- SessionListOkBody
  - `sessions` SessionListEntry[], required
    - `id` string, required: The unique identifier of the session.
    - `image` string, required: The name of the image of the game that is hosted inside the container.
    - `tag` string: The build tag of the image the container is derived from.
    - `location` string, required: The location or region that the game session is hosted in.
    - `host` string, required: The IP address of the host machine the game session is hosted on.
    - `created` number, required: The unix timestamp the session was created in.
    - `port` object, required: A record of exposed ports for this container.
    - `status` 'created' | 'running' | 'restarting' | 'exited' | 'dead' | 'draining' | 'shuttingdown' | 'server_unreachable': The current runtime status of the underlying container.
    - `labels` object: The collection of user-defined key/value metadata stored inside the configuration of the session.
    - `playerCount` integer

## Other responses

- `401`: You are not authorized to fetch a list of active sessions. Please make sure that the included bearer token is correct.
- `403`: Your API token may not have the required permissions to invoke this endpoint.

---

[API](https://skmtc.dev/gameye/apis/gameye-session-api.md) · [All operations](https://skmtc.dev/gameye/apis/gameye-session-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gameye/apis/gameye-session-api/revisions/e6f57f399b73?raw)
