Playlist API
Get all existing playlist for the current organization using pagination
Example Request:
Querystring Parameters:
These parameters are used as querystring parameters.
- query - Limit response to playlist having a name like this value.
- limit - Limit response to X number of playlist.
Example Response:
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 1,
"name": "my playlist",
"interval": "5m"
}
]
Get one playlist
GET /api/playlists/:id
Example Request:
GET /api/playlists/1 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
HTTP/1.1 200
Content-Type: application/json
{
"id" : 1,
"name": "my playlist",
"interval": "5m",
"orgId": "my org",
"items": [
{
"id": 1,
"playlistId": 1,
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistId": 1,
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
GET /api/playlists/:id/items
Example Request:
Example Response:
Content-Type: application/json
[
{
"id": 1,
"playlistId": 1,
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistId": 1,
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
Get Playlist dashboards
GET /api/playlists/:id/dashboards
Example Request:
GET /api/playlists/1/dashboards HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 3,
"title": "my third dashboard",
"order": 1,
},
{
"id": 5,
"title":"my other dashboard"
"order": 2,
}
]
POST /api/playlists/
Example Response:
HTTP/1.1 200
Content-Type: application/json
{
"id": 1,
"name": "my playlist",
"interval": "5m"
}
Update a playlist
PUT /api/playlists/:id
Example Request:
PUT /api/playlists/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"interval": "5m",
"items": [
{
"playlistId": 1,
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"playlistId": 1,
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
Example Response:
HTTP/1.1 200
Content-Type: application/json
{
"id" : 1,
"name": "my playlist",
"interval": "5m",
"orgId": "my org",
"items": [
{
"id": 1,
"playlistId": 1,
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistId": 1,
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
DELETE /api/playlists/:id
Example Request:
Example Response:
HTTP/1.1 200
{}