2022-05-26 11:06:25 -04:00
---
aliases:
2025-11-13 09:04:57 -05:00
- ../../../http_api/playlist/ # /docs/grafana/next/http_api/playlist/
- ../../../developers/http_api/playlist/ # /docs/grafana/next/developers/http_api/playlist/
canonical: https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/playlist/
2022-05-26 11:06:25 -04:00
description: Playlist Admin HTTP API
keywords:
- grafana
- http
- documentation
- api
- playlist
Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/enterprise-licensing pages to have 'Enterprise' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/recorded-queries pages to have labels cloud,enterprise
* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/stats-and-license pages to have labels cloud,enterprise
* Set alerting pages to have labels cloud,enterprise,oss
* Set breaking-changes pages to have labels cloud,enterprise,oss
* Set dashboards pages to have labels cloud,enterprise,oss
* Set datasources pages to have labels cloud,enterprise,oss
* Set explore pages to have labels cloud,enterprise,oss
* Set fundamentals pages to have labels cloud,enterprise,oss
* Set introduction/grafana-cloud pages to have labels cloud
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix introduction pages products
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set panels-visualizations pages to have labels cloud,enterprise,oss
* Set release-notes pages to have labels cloud,enterprise,oss
* Set search pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set troubleshooting pages to have labels cloud,enterprise,oss
* Set whatsnew pages to have labels cloud,enterprise,oss
* Apply updated labels from review
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 04:10:12 -04:00
labels:
products:
- enterprise
- oss
2025-11-13 09:04:57 -05:00
- cloud
2022-05-26 11:06:25 -04:00
title: 'Playlist HTTP API '
2026-04-15 06:17:11 -04:00
weight: 100
2022-05-26 11:06:25 -04:00
---
2018-07-17 10:45:39 -04:00
# Playlist API
2026-04-15 06:17:11 -04:00
{{< admonition type = "note" > }}
Available in Grafana 12 and later.
This API complies with the new Grafana API structure. To learn more refer to documentation about the [API structure in Grafana ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/apis ).
{{< / admonition > }}
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
## List Playlists
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
`GET /apis/playlist.grafana.app/v1/namespaces/:namespace/playlists`
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
Lists all playlists in the specified namespace.
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
- `namespace` : To learn more about which namespace to use, refer to the [API overview ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/ ).
2018-07-17 10:45:39 -04:00
**Example Request**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
GET /apis/playlist.grafana.app/v1/namespaces/default/playlists HTTP/1.1
2018-07-17 10:45:39 -04:00
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
2020-01-27 07:41:15 -05:00
```http
2018-07-17 10:45:39 -04:00
HTTP/1.1 200
Content-Type: application/json
2026-02-09 01:36:26 -05:00
2018-07-17 10:45:39 -04:00
{
2026-02-09 01:36:26 -05:00
"kind": "PlaylistList",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {},
2018-07-17 10:45:39 -04:00
"items": [
{
2026-02-09 01:36:26 -05:00
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-playlist-uid",
"namespace": "default",
"resourceVersion": "1234567890",
"creationTimestamp": "2024-01-15T10:30:00Z"
},
"spec": {
"title": "My Playlist",
"interval": "5m",
"items": [
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-1"
},
{
"type": "dashboard_by_tag",
"value": "important"
}
]
}
2018-07-17 10:45:39 -04:00
}
]
}
```
2026-02-09 01:36:26 -05:00
## Get a Playlist
`GET /apis/playlist.grafana.app/v1/namespaces/:namespace/playlists/:name`
Retrieves a specific playlist by name.
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
- `namespace` : To learn more about which namespace to use, refer to the [API overview ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/ ).
- `name` : The UID of the playlist.
2018-07-17 10:45:39 -04:00
**Example Request**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
GET /apis/playlist.grafana.app/v1/namespaces/default/playlists/my-playlist-uid HTTP/1.1
2018-07-17 10:45:39 -04:00
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
2020-01-27 07:41:15 -05:00
```http
2018-07-17 10:45:39 -04:00
HTTP/1.1 200
Content-Type: application/json
2026-02-09 01:36:26 -05:00
{
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-playlist-uid",
"namespace": "default",
"resourceVersion": "1234567890",
"creationTimestamp": "2024-01-15T10:30:00Z"
2018-07-17 10:45:39 -04:00
},
2026-02-09 01:36:26 -05:00
"spec": {
"title": "My Playlist",
"interval": "5m",
"items": [
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-1"
},
{
"type": "dashboard_by_tag",
"value": "important"
}
]
2018-07-17 10:45:39 -04:00
}
2026-02-09 01:36:26 -05:00
}
2018-07-17 10:45:39 -04:00
```
2026-02-09 01:36:26 -05:00
## Create a Playlist
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
`POST /apis/playlist.grafana.app/v1/namespaces/:namespace/playlists`
Creates a new playlist.
- `namespace` : To learn more about which namespace to use, refer to the [API overview ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/ ).
2018-07-17 10:45:39 -04:00
**Example Request**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
POST /apis/playlist.grafana.app/v1/namespaces/default/playlists HTTP/1.1
2018-07-17 10:45:39 -04:00
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
2026-02-09 01:36:26 -05:00
{
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-new-playlist-uid"
},
"spec": {
"title": "My New Playlist",
2018-07-17 10:45:39 -04:00
"interval": "5m",
"items": [
{
2024-09-13 04:59:20 -04:00
"type": "dashboard_by_uid",
2026-02-09 01:36:26 -05:00
"value": "dashboard-uid-1"
2018-07-17 10:45:39 -04:00
},
{
"type": "dashboard_by_tag",
2026-02-09 01:36:26 -05:00
"value": "monitoring"
2018-07-17 10:45:39 -04:00
}
]
}
2026-02-09 01:36:26 -05:00
}
2018-07-17 10:45:39 -04:00
```
**Example Response**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
HTTP/1.1 201 Created
2018-07-17 10:45:39 -04:00
Content-Type: application/json
2026-02-09 01:36:26 -05:00
{
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-new-playlist-uid",
"namespace": "default",
"resourceVersion": "1234567891",
"creationTimestamp": "2024-01-15T10:35:00Z"
},
"spec": {
"title": "My New Playlist",
"interval": "5m",
"items": [
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-1"
},
{
"type": "dashboard_by_tag",
"value": "monitoring"
}
]
2018-07-17 10:45:39 -04:00
}
2026-02-09 01:36:26 -05:00
}
2018-07-17 10:45:39 -04:00
```
2026-02-09 01:36:26 -05:00
## Update a Playlist
`PUT /apis/playlist.grafana.app/v1/namespaces/:namespace/playlists/:name`
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
Updates an existing playlist. The entire playlist spec must be provided.
- `namespace` : To learn more about which namespace to use, refer to the [API overview ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/ ).
- `name` : The UID of the playlist.
2018-07-17 10:45:39 -04:00
**Example Request**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
PUT /apis/playlist.grafana.app/v1/namespaces/default/playlists/my-playlist-uid HTTP/1.1
2018-07-17 10:45:39 -04:00
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
2026-02-09 01:36:26 -05:00
{
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-playlist-uid",
"namespace": "default",
"resourceVersion": "1234567890"
},
"spec": {
"title": "My Updated Playlist",
"interval": "10m",
2018-07-17 10:45:39 -04:00
"items": [
{
2024-09-13 04:59:20 -04:00
"type": "dashboard_by_uid",
2026-02-09 01:36:26 -05:00
"value": "dashboard-uid-1"
},
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-2"
2018-07-17 10:45:39 -04:00
},
{
"type": "dashboard_by_tag",
2026-02-09 01:36:26 -05:00
"value": "updated-tag"
2018-07-17 10:45:39 -04:00
}
]
}
2026-02-09 01:36:26 -05:00
}
2018-07-17 10:45:39 -04:00
```
**Example Response**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
HTTP/1.1 200 OK
2018-07-17 10:45:39 -04:00
Content-Type: application/json
2026-02-09 01:36:26 -05:00
2018-07-17 10:45:39 -04:00
{
2026-02-09 01:36:26 -05:00
"kind": "Playlist",
"apiVersion": "playlist.grafana.app/v1",
"metadata": {
"name": "my-playlist-uid",
"namespace": "default",
"resourceVersion": "1234567892",
"creationTimestamp": "2024-01-15T10:30:00Z"
},
"spec": {
"title": "My Updated Playlist",
"interval": "10m",
"items": [
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-1"
},
{
"type": "dashboard_by_uid",
"value": "dashboard-uid-2"
},
{
"type": "dashboard_by_tag",
"value": "updated-tag"
}
]
}
2018-07-17 10:45:39 -04:00
}
```
2026-02-09 01:36:26 -05:00
## Delete a Playlist
`DELETE /apis/playlist.grafana.app/v1/namespaces/:namespace/playlists/:name`
2018-07-17 10:45:39 -04:00
2026-02-09 01:36:26 -05:00
Deletes a playlist.
- `namespace` : To learn more about which namespace to use, refer to the [API overview ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/ ).
- `name` : The UID of the playlist.
2018-07-17 10:45:39 -04:00
**Example Request**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
DELETE /apis/playlist.grafana.app/v1/namespaces/default/playlists/my-playlist-uid HTTP/1.1
2018-07-17 10:45:39 -04:00
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
2020-01-27 07:41:15 -05:00
```http
2026-02-09 01:36:26 -05:00
HTTP/1.1 200 OK
2018-07-17 10:45:39 -04:00
Content-Type: application/json
2026-02-09 01:36:26 -05:00
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Success",
"code": 200
}
2018-07-17 10:45:39 -04:00
```
2026-02-09 01:36:26 -05:00
## Playlist Item Types
Playlist items support three types:
- `dashboard_by_uid` : Include a specific dashboard by its UID
- `dashboard_by_tag` : Include all dashboards with a specific tag
- `dashboard_by_id` : (Deprecated) Include a dashboard by internal ID