Tracks Public

Get list of all tracks in all playlists.

Query-parameters schema → GetTracksRequestPayload

get/playlists/tracks

Request

  • Base URL: https://musicfun.it-incubator.app/api/1.0
  • URL: https://musicfun.it-incubator.app/api/1.0/playlists/tracks
  • Auth: API key in header api-key

Query parameters

pageNumbernumber

Page number for pagination (starting from 1)

pageSizenumber

Page size for pagination (between 0 and 20)

searchstring

Search term for filtering playlists by name

sortBy'publishedAt' | 'likesCount'

Field by which to sort tracks

sortDirection'asc' | 'desc'

Sort direction (ascending or descending)

tagsIdsstring[]

Filter by tag IDs (multiple values allowed)

artistsIdsstring[]

Filter by artist IDs (multiple values allowed)

userIdstring

Filter by user ID (track creator's ID)

includeDraftsboolean

If true, include unpublished tracks (drafts) of current user if userId === currentUserId

onlyLikedByMeboolean

If true, return only tracks liked by the current authenticated user

paginationType'offset' | 'cursor'

Pagination type: "offset" for page-number pagination; "cursor" for keyset/seek-based pagination.

cursorstring nullable

Base64-encoded cursor for keyset pagination. Used only if paginationType is "cursor".

Response

OK: Paginated list of tracks

Example response

{
  "data": [
    {
      "type": "tracks",
      "attributes": {
        "attachments": [
          {
            "url": "https://cdn.example.com/uploads/track123/cover.jpg",
            "contentType": "image/jpeg",
            "originalName": "cover.jpg",
            "fileSize": 34872
          }
        ]
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.