# Query

> Query for active lobbies.

Query for active lobbies.

Authentication Required: `Yes`

```bash
ugs lobby query [options]
```

## Options

|                  | Alias                  | Description                                                                                                                    |
| ---------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| service-id       | --service-id           | (REQUIRED) The service ID.                                                                                                     |
| player-id        | --player-id            | The ID of the player to impersonate.                                                                                           |
| body             | -b, --body             | The query in JSON. If this is a file path, the content of the file is used; otherwise, the raw string is used. \[default: \{}] |
| project-id       | -p, --project-id       | The Unity cloud project ID.                                                                                                    |
| environment-name | -e, --environment-name | The services environment name.                                                                                                 |
| help             | -?, -h, --help         | Display help and usage information.                                                                                            |
| quiet            | -q, --quiet            | Reduce logging to a minimum.                                                                                                   |
| json             | -j, --json             | Use JSON as the output format.                                                                                                 |
