-
Notifications
You must be signed in to change notification settings - Fork 5
GetPlaylists
Walter Lara edited this page May 18, 2024
·
7 revisions
Allows to retrieve Playlists. This endpoint supports pagination and filtering.
URLs: /v1/playlists
Method: GET
Path Parameters: None
Query Parameters:
Parameter | Type | Description | Requirement Type |
---|---|---|---|
offset | integer | Start offset of paginated results to retrieve. Default is 0. | Optional |
limit | integer | Maximum number of paginated results to retrieve. Default is 25. | Optional |
sortOrder | string | Sort order of the results based on createdAt field. Valid values are desc (newest first) and asc (oldest first). Default is asc. |
Optional |
ids | string list | Comma-separated list of playlist UUID's for filtering results. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. |
Optional |
ownerIds | string list | Comma-separated list of owner UUID's for filtering results. A value of "me" can be used instead of the caller's UUID. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. |
Optional |
olderThan | string | ISO-8601 formated oldest (maximum) timestamp to filter-out results. If missing, defaults to no filtering out. | Optional |
newerThan | string | ISO-8601 formated newest (minimum) timestamp to filter-out results. If missing, defaults to no filtering out. | Optional |
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": "The Best Of The Weeknd"
},
{
"id": "5cd11788-4cc1-4768-b4fa-4c0f519a94c5",
"ownerId": "842f5460-76f8-41d8-add9-d043a7a381de",
"createdAt": "2022-05-22T20:46:46.738741",
"name": "Top 10"
}
]
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.
Code: 422 UNPROCESSABLE ENTITY
Condition: If any of the UUID query 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)