-
Notifications
You must be signed in to change notification settings - Fork 5
PatchPlaylist
Allows to update an existing Playlist. Only allowed if the requestor is the Playlist owner.
URL: /v1/playlists/{playlistId}
Method: PATCH
Path Parameters:
Parameter | Type | Description |
---|---|---|
playlistId | string | UUID of the Playlist to update. |
Query Parameters: None
Headers:
Authorization: Bearer {accessToken}
Content-Type: application/json
Content:
| Field | Type | Description | Requirement Type | | --- | --- | --- | | name | string | Playlist name. | Optional |
Content example:
{
"name": "The Best of The Weeknd"
}
Code: 204 NO CONTENT
Headers: None
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.
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"
}
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"
}
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"
}