Project: Grafana (Observability and Analysis / Observability)
File: playlist.md

aliases: ../../http_api/playlist/ canonical: /docs/grafana/latest/developers/http_api/playlist/ description: Playlist Admin HTTP API keywords: grafana http documentation api playlist labels: products: enterprise oss title: 'Playlist HTTP API ' `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 /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": "dashboardbyid", "value": "3", "order": 1, "title":"my third dashboard" }, { "id": 2, "playlistUid": "1", "type": "dashboardbytag", "value": "myTag", "order": 2, "title":"my other dashboard" } ] } ``` `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": "dashboardbyid", "value": "3", "order": 1, "title":"my third dashboard" }, { "id": 2, "playlistUid": "1", "type": "dashboardbytag", "value": "myTag", "order": 2, "title":"my other dashboard" } ] ``` `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": "dashboardbyid", "value": "3", "order": 1, "title":"my third dashboard" }, { "type": "dashboardbytag", "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" } ``` `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": "dashboardbyid", "value": "3", "order": 1, "title":"my third dashboard" }, { "playlistUid": "1", "type": "dashboardbytag", "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": "dashboardbyid", "value": "3", "order": 1, "title":"my third dashboard" }, { "id": 2, "playlistUid": "1", "type": "dashboardbytag", "value": "myTag", "order": 2, "title":"my other dashboard" } ] } ``` `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 {} ```