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:

    1. HTTP/1.1 200
    2. Content-Type: application/json
    3. [
    4. {
    5. "id": 1,
    6. "name": "my playlist",
    7. "interval": "5m"
    8. }
    9. ]

    Get one playlist

    GET /api/playlists/:id

    Example Request:

    1. GET /api/playlists/1 HTTP/1.1
    2. Accept: application/json
    3. Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
    1. HTTP/1.1 200
    2. Content-Type: application/json
    3. {
    4. "id" : 1,
    5. "name": "my playlist",
    6. "interval": "5m",
    7. "orgId": "my org",
    8. "items": [
    9. {
    10. "id": 1,
    11. "playlistId": 1,
    12. "type": "dashboard_by_id",
    13. "value": "3",
    14. "order": 1,
    15. "title":"my third dashboard"
    16. },
    17. {
    18. "id": 2,
    19. "playlistId": 1,
    20. "type": "dashboard_by_tag",
    21. "value": "myTag",
    22. "order": 2,
    23. "title":"my other dashboard"
    24. }
    25. ]
    26. }

    GET /api/playlists/:id/items

    Example Request:

    Example Response:

    1. Content-Type: application/json
    2. [
    3. {
    4. "id": 1,
    5. "playlistId": 1,
    6. "value": "3",
    7. "order": 1,
    8. "title":"my third dashboard"
    9. },
    10. {
    11. "id": 2,
    12. "playlistId": 1,
    13. "type": "dashboard_by_tag",
    14. "value": "myTag",
    15. "order": 2,
    16. "title":"my other dashboard"
    17. }
    18. ]

    Get Playlist dashboards

    GET /api/playlists/:id/dashboards

    Example Request:

    1. GET /api/playlists/1/dashboards HTTP/1.1
    2. Accept: application/json
    3. Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

    Example Response:

    1. HTTP/1.1 200
    2. Content-Type: application/json
    3. [
    4. {
    5. "id": 3,
    6. "title": "my third dashboard",
    7. "order": 1,
    8. },
    9. {
    10. "id": 5,
    11. "title":"my other dashboard"
    12. "order": 2,
    13. }
    14. ]

    POST /api/playlists/

    Example Response:

    1. HTTP/1.1 200
    2. Content-Type: application/json
    3. {
    4. "id": 1,
    5. "name": "my playlist",
    6. "interval": "5m"
    7. }

    Update a playlist

    PUT /api/playlists/:id

    Example Request:

    1. PUT /api/playlists/1 HTTP/1.1
    2. Accept: application/json
    3. Content-Type: application/json
    4. {
    5. "interval": "5m",
    6. "items": [
    7. {
    8. "playlistId": 1,
    9. "type": "dashboard_by_id",
    10. "value": "3",
    11. "order": 1,
    12. "title":"my third dashboard"
    13. },
    14. {
    15. "playlistId": 1,
    16. "type": "dashboard_by_tag",
    17. "value": "myTag",
    18. "order": 2,
    19. "title":"my other dashboard"
    20. }
    21. ]
    22. }

    Example Response:

    1. HTTP/1.1 200
    2. Content-Type: application/json
    3. {
    4. "id" : 1,
    5. "name": "my playlist",
    6. "interval": "5m",
    7. "orgId": "my org",
    8. "items": [
    9. {
    10. "id": 1,
    11. "playlistId": 1,
    12. "type": "dashboard_by_id",
    13. "value": "3",
    14. "order": 1,
    15. "title":"my third dashboard"
    16. },
    17. {
    18. "id": 2,
    19. "playlistId": 1,
    20. "type": "dashboard_by_tag",
    21. "value": "myTag",
    22. "order": 2,
    23. "title":"my other dashboard"
    24. }
    25. ]
    26. }

    DELETE /api/playlists/:id

    Example Request:

    Example Response:

    1. HTTP/1.1 200
    2. {}