GET /playlists

Vrátí seznam playlistů. Podporuje stránkování a základní filtrování.

Query parameters

  • page integer

    Číslo stránky (od 1)

    Minimum value is 1. Default value is 1.

  • limit integer

    Počet záznamů na stránku

    Minimum value is 1, maximum value is 100. Default value is 20.

  • q string

    Volitelné fulltextové hledání podle názvu playlistu

  • userId string

    Filtrování playlistů podle vlastníka

Responses

  • 200 application/json

    Seznam playlistů načten. Vrací pole playlistů a informace o stránkování.

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes object
      • id
      • name string
      • userId string
      • songIds array[string]
      • songCount integer
    • pagination object
      Hide pagination attributes Show pagination attributes object
      • page integer
      • limit integer
      • total integer
  • 400 application/json

    Chyba v požadavku klienta

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 401 application/json

    Chyba autentizace

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 403 application/json

    Nedostatečná oprávnění

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 500 application/json

    Chyba serveru

    Hide response attributes Show response attributes object
    • code string
    • message string
GET /playlists
curl \
 --request GET 'https://api.mstonjek.cz/v1/playlists' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": "playlist_001",
      "name": "Chill Vibes",
      "userId": "user_123",
      "songIds": [
        "song_123",
        "song_456"
      ],
      "songCount": 2
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 3
  }
}
Response examples (400)
{
  "code": "BAD_REQUEST",
  "message": "Neplatný formát dat v těle požadavku."
}
Response examples (401)
{
  "code": "UNAUTHORIZED",
  "message": "Token není platný"
}
Response examples (403)
{
  "code": "FORBIDDEN",
  "message": "Nemáte oprávnění"
}
Response examples (500)
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Server momentálně nedostupný"
}