Skip to content

DeletePlaylist

Walter Lara edited this page Mar 24, 2023 · 2 revisions

Delete Playlisy

Deletes an existing Playlist. Only allowed if the requestor is the Playlist owner.

Request

URL: /v1/playlists/{playlistId}

Method: DELETE

Path Parameters:

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

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

✅ Success Response

Code: 204 NO CONTENT

Headers: None

❌ Error Responses

1. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

2. Forbidden

Code: 403 FORBIDDEN

Condition: If the requestor is not the Playlist owner.

Headers:

Content-Type: application/json

Content example:

{
    "code": 403,
    "description": "Forbidden",
    "cause": "operation allowed only by owner"
}

3. 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 PlaylistEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}

4. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If {playlistId} 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 Playlist

Get Playlists

Get Playlist Count

Put Playlist Song

Get Playlist Songs

Delete Playlist Song

Clone this wiki locally