# Get zones

```
GET /vssls
```

Returns the zone status for a given zone or all zones.

## Parameters

| Parameter | Data Type         | Value                              |
| --------- | ----------------- | ---------------------------------- |
| `serial`  | string, optional  | the serial number of a vssl device |
| `number`  | integer, optional | the zone number.                   |

> Note: if you don't include serial or number them then the response will include all modules

## Response

Status of the call

## Example Request

Sample HTTP request

{% tabs %}
{% tab title="curl" %}
```bash
$ curl http://192.168.121.15:8000/api/vssls
```
{% endtab %}

{% tab title="IP Cmd" %}
```bash
IP: 192.168.0.15
Host: 8000
Data: "GET /api/vssls HTTP/1.1\r\n\r\n"
```
{% endtab %}

{% tab title="httpie" %}
```bash
$ http GET 192.168.121.15:8000/api/vssls
```
{% endtab %}

{% tab title="node" %}
```javascript
const axios = require('axios');

axios.get('http://192.168.121.15:8000/api/vssls').then((response)=>{
    console.log(response);
  }).catch((response)=>{
    console.log('Error making request');
  })
```
{% endtab %}
{% endtabs %}

## Example Response

```javascript
{
    "modules": [
        {
            "ipAddress": "192.168.20.42",
            "macAddress": "00BD27EF6F03",
            "macAddress2": "",
            "name": "UP1",
            "number": 1,
            "serial": "00BD27EF74AE",
            "mute": 0,
            "volume": "46",
            "playState": 0,
            "source": 25,
            "fwVersion": "p9722.281.37xx",
            "isInParty": 1,
            "powerState": 0,
            "analogInputSource": "0 None",
            "isBus1OutFixedVol": 0,
            "isBus2OutFixedVol": 0,
            "priority": 1,
            "isParentOfGroup": 0,
            "groupParentZone": 0,
            "currentTime": 0,
            "songMetaData": null
        }
    ]
}
```

## Legend

| Parameter         | Data Type | Value                                                                                                          |
| ----------------- | --------- | -------------------------------------------------------------------------------------------------------------- |
| `playState`       | integer   | 0-stopped, 1-playing, 2-paused                                                                                 |
| `source`          | integer   | 1-Airplay, 4-Spotify, 9-TuneIn, 15-LineIn, 17-DirectUrl, 22-Tidal, 24-GoogleCast, 25-ExternalSource            |
| `powerState`      | integer   | 0-on, 1-standby, 2-deep sleep                                                                                  |
| `currentTime`     | string    | current play time in seconds                                                                                   |
| `totalTime`       | string    | length of current song in seconds                                                                              |
| `coverArtUrl`     | string    | url where the cover art for the current song can be downloaded from                                            |
| `isParentOfGroup` | boolean   | boolean that indicates if this zone is the parent of a group                                                   |
| `groupParentZone` | integer   | if this zone is the child of a group, then this is the zone number of the parent of the group                  |
| `priority`        | integer   | 0 - Stream -> Party zone -> Bus1In -> Bus2In -> Analog, 1 - Bus1In -> Bus2In -> Analog -> Stream -> Party zone |
