Menu
Enterprise
Open source
Playlist API
Search Playlist
GET /api/playlists
Get all existing playlist for the current organization using pagination
Example Request:
http
GET /api/playlists HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
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
HTTP/1.1 200
Content-Type: application/json
[
{
"uid": "1",
"name": "my playlist",
"interval": "5m"
}
]
Get one playlist
GET /api/playlists/:uid
Example Request:
http
GET /api/playlists/1 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
{
"uid" : "1",
"name": "my playlist",
"interval": "5m",
"items": [
{
"id": 1,
"playlistUid": "1",
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistUid": "1",
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
Get Playlist items
GET /api/playlists/:uid/items
Example Request:
http
GET /api/playlists/1/items HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 1,
"playlistUid": "1",
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistUid": "1",
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
Get Playlist dashboards
GET /api/playlists/:uid/dashboards
Example Request:
http
GET /api/playlists/1/dashboards HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
[
{
"id": 3,
"title": "my third dashboard",
"order": 1,
},
{
"id": 5,
"title":"my other dashboard"
"order": 2,
}
]
Create a playlist
POST /api/playlists/
Example Request:
http
PUT /api/playlists/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"name": "my playlist",
"interval": "5m",
"items": [
{
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
{
"uid": "1",
"name": "my playlist",
"interval": "5m"
}
Update a playlist
PUT /api/playlists/:uid
Example Request:
http
PUT /api/playlists/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"name": "my playlist",
"interval": "5m",
"items": [
{
"playlistUid": "1",
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"playlistUid": "1",
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
{
"uid" : "1",
"name": "my playlist",
"interval": "5m",
"items": [
{
"id": 1,
"playlistUid": "1",
"type": "dashboard_by_id",
"value": "3",
"order": 1,
"title":"my third dashboard"
},
{
"id": 2,
"playlistUid": "1",
"type": "dashboard_by_tag",
"value": "myTag",
"order": 2,
"title":"my other dashboard"
}
]
}
Delete a playlist
DELETE /api/playlists/:uid
Example Request:
http
DELETE /api/playlists/1 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
http
HTTP/1.1 200
Content-Type: application/json
{}
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with the Grafana LGTM Stack
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.

Getting started with Grafana dashboard design (EMEA Timezone)
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.

Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.