Repository navigation
GetPlaylist
Walter Lara edited this page Apr 15, 2023
·
3 revisions
Allows to retrive a Playlist.
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
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"
}Code: 401 UNAUTHORIZED
Condition: If {accessToken} is invalid or expired.
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"
}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"
}Post Playlist (Add New Playlist)