---
title: "Get the active playlist and next re-evaluation deadline"
method: GET
path: "/api/v2/viewer/playlist"
tags: ["viewer"]
---

# Get the active playlist and next re-evaluation deadline

`GET /api/v2/viewer/playlist`

Active assets + next deadline, evaluated against server time.

Intended for the C++ viewer (GH #2906 Phase 3) so the viewer no
longer needs Django ORM access or its own ``Asset.is_active()``
re-implementation. The Python viewer keeps using
``anthias_viewer.scheduling.generate_asset_list()`` directly until
Phase 3 swaps it.

Internal-auth gated for the same reason as
``AssetRecheckViewV2``: the viewer can't attach operator
BasicAuth, so it presents the shared token derived from
``anthias.conf``.

## Response `200`

- ViewerPlaylistSerializerV2 — Server-evaluated playlist for the C++ viewer. The deadline is the soonest UTC moment at which the viewer should re-fetch this endpoint — derived from asset start/end boundaries plus a 60s cap when any returned asset has a day-of-week or time-of-day window. ``now`` is the server's notion of the evaluation timestamp; clients use it to compute deadline-relative sleeps without trusting their own clock.
  - `assets` AssetSerializerV2[], required
    - `asset_id` string, required
    - `name` string, nullable
    - `uri` string, nullable
    - `start_date` string, date-time, nullable
    - `end_date` string, date-time, nullable
    - `duration` integer, nullable
    - `mimetype` string, nullable
    - `is_enabled` boolean
    - `nocache` boolean
    - `play_order` integer
    - `skip_asset_check` boolean
    - `skip_ssl_verify` boolean
    - `is_active` boolean, required
    - `is_processing` boolean
    - `play_days` integer[], required
    - `play_time_from` string, time, nullable
    - `play_time_to` string, time, nullable
    - `is_reachable` boolean, required
    - `last_reachability_check` string, date-time, nullable, required
    - `metadata` object, required
    - `refresh_interval_s` integer, required
    - `custom_headers` object, required
  - `deadline` string, date-time, nullable, required
  - `now` string, date-time, required

## Other responses

- `403` — No response body

---

[API](https://skmtc.dev/screenly/apis/anthias-api.md) · [All operations](https://skmtc.dev/screenly/apis/anthias-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/screenly/anthias-api/revisions/db7a06ac59cc/schema)
