# List all current playlists.

`GET /station/{station_id}/playlists`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKey": []
  }
]
```

- ApiKey: apiKey, header X-API-Key

Parameters:

- `station_id` (path, unknown, required)
  Type: unknown
  
  anyOf:
    Type: integer, int64
  
    Type: string, string

- `filter[source]` (query, string, optional) - Filter by playlist source. Repeat as filter[source][] to match several values.
  Type: string
  
  Schema: [PlaylistSources](https://sourcey-azuracast.pages.dev/docs/api/models/playlistsources/index.md)
  
  enum: ["songs","playlists","remote_url","requests"]

- `filter[type]` (query, string, optional) - Filter by playlist type. Repeat as filter[type][] to match several values.
  Type: string
  
  Schema: [PlaylistTypes](https://sourcey-azuracast.pages.dev/docs/api/models/playlisttypes/index.md)
  
  enum: ["default","once_per_x_songs","once_per_x_minutes","once_per_hour","custom"]

- `filter[order]` (query, string, optional) - Filter by playback order. Repeat as filter[order][] to match several values.
  Type: string
  
  Schema: [PlaylistOrders](https://sourcey-azuracast.pages.dev/docs/api/models/playlistorders/index.md)
  
  enum: ["random","shuffle","sequential"]

Responses:

- 200: Success

Content type: application/json

Type: array

Items:
  Type: unknown
  
  allOf:
    Reference: [StationPlaylist](https://sourcey-azuracast.pages.dev/docs/api/models/stationplaylist/index.md); Type: object
  
    Reference: [HasLinks](https://sourcey-azuracast.pages.dev/docs/api/models/haslinks/index.md); Type: object
  
    Reference: [Api_StationPlaylistComputedFields](https://sourcey-azuracast.pages.dev/docs/api/models/api-stationplaylistcomputedfields/index.md); Type: object

- 403: Access denied.

Content type: application/json

Type: object

Schema: [Api_Error](https://sourcey-azuracast.pages.dev/docs/api/models/api-error/index.md)

- `code` (required)
  Type: integer
  
  The numeric code of the error.
  
  Example:
  
  ```json
  500
  ```

- `type` (required)
  Type: string
  
  The programmatic class of error.
  
  Example:
  
  ```json
  "NotLoggedInException"
  ```

- `message` (required)
  Type: string
  
  The text description of the error.
  
  Example:
  
  ```json
  "Error description."
  ```

- `formatted_message` (required)
  Type: string; nullable
  
  The HTML-formatted text description of the error.
  
  Example:
  
  ```json
  "<b>Error description.</b><br>Detailed error text."
  ```

- `extra_data` (required)
  Type: array
  
  Stack traces and other supplemental data.
  
  Items:
    Type: any

- `success` (required)
  Type: boolean
  
  Used for API calls that expect an \Entity\Api\Status type response.
  
  Example:
  
  ```json
  false
  ```

- 500: A generic exception has occurred.

Content type: application/json

Type: object

Schema: [Api_Error](https://sourcey-azuracast.pages.dev/docs/api/models/api-error/index.md)

- `code` (required)
  Type: integer
  
  The numeric code of the error.
  
  Example:
  
  ```json
  500
  ```

- `type` (required)
  Type: string
  
  The programmatic class of error.
  
  Example:
  
  ```json
  "NotLoggedInException"
  ```

- `message` (required)
  Type: string
  
  The text description of the error.
  
  Example:
  
  ```json
  "Error description."
  ```

- `formatted_message` (required)
  Type: string; nullable
  
  The HTML-formatted text description of the error.
  
  Example:
  
  ```json
  "<b>Error description.</b><br>Detailed error text."
  ```

- `extra_data` (required)
  Type: array
  
  Stack traces and other supplemental data.
  
  Items:
    Type: any

- `success` (required)
  Type: boolean
  
  Used for API calls that expect an \Entity\Api\Status type response.
  
  Example:
  
  ```json
  false
  ```

## Examples

### cURL

```bash
curl -X GET 'https://demo.azuracast.com/api/station/0/playlists' \
  -H 'X-API-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://demo.azuracast.com/api/station/0/playlists', {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://demo.azuracast.com/api/station/0/playlists',
    headers={
        'X-API-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```
