Skip to content

GetPlaylist

Walter Lara edited this page Apr 15, 2023 · 3 revisions

Get Playlist

Allows to retrive a Playlist.

Request

URL: /v1/playlists/{playlistId}

Method: GET

Path Parameters:

Parameter Type Description
playlistId string UUID of the Playlist to retrieve.

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

Accept: application/json

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
id string UUID of the Playlist. Always
ownerId string UUID of the Playlist owner (creator). Always
createdAt string Date and time when the Playlist was created (ISO-8601 format). Always
name string Playlist name. Always

Content example:

{
    "id": "7bd2862f-8deb-4814-8943-156d9dab80dd",
    "ownerId": "842f5460-76f8-41d8-add9-d043a7a381de",
    "createdAt": "2022-04-22T20:47:55.738918",
    "name": "Top 10"
}

❌ Error Responses

1. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

2. Not Found

Code: 404 NOT FOUND

Condition: If the specified Playlist is not found.

Headers:

Content-Type: application/json

Content example:

{
    "code": 404,
    "description": "Not Found",
    "cause": "Entity PlaylisyEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}

3. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If any of the UUID parameters is malformed.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Invalid UUID string: 123456789"
}

See Also

Post Playlist (Add New Playlist)

Patch Playlist (Update Playlist)

Get Playlists

Get Playlist Count

Delete Playlist

Put Playlist Song

Get Playlist Songs

Delete Playlist Song

Clone this wiki locally