플레이리스트 API - Amazon Managed Grafana

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

플레이리스트 API

재생 목록 API를 사용하여 Amazon Managed Grafana 작업 영역에서 재생 목록으로 작업하십시오.

참고

아마존 관리형 그라파나 워크스페이스에서 Grafana API를 사용하려면 유효한 Grafana API 토큰이 있어야 합니다. API 요청의 필드에 이를 포함시키세요. Authorization API 호출을 인증하기 위한 토큰을 생성하는 방법에 대한 자세한 내용은 을 참조하십시오토큰으로 인증.

GET /api/playlists

페이지 매김을 사용하여 현재 Amazon 관리형 Grafana 작업 공간의 모든 재생 목록을 반환합니다.

요청 예제

GET /api/playlists HTTP/1.1 Accept: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

쿼리 문자열 파라미터:

  • query — 이름이 이 값과 같은 재생목록에 대한 응답을 제한합니다.

  • limit — 응답을 재생목록 개수를 X개로 제한합니다.

응답의 예

HTTP/1.1 200 Content-Type: application/json [ { "id": 1, "name": "my playlist", "interval": "5m" } ]

재생목록 1개 가져오기

GET /api/playlists/:id

요청 예제

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

요청 예제

GET /api/playlists/1/items HTTP/1.1 Accept: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

응답의 예

HTTP/1.1 200 Content-Type: application/json [ { "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/dashboards

요청 예제

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

응답의 예

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/

요청 예제

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" } ] }

응답의 예

HTTP/1.1 200 Content-Type: application/json { "id": 1, "name": "my playlist", "interval": "5m" }

재생목록 업데이트

PUT /api/playlists/:id

요청 예제

PUT /api/playlists/1 HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk { "name": "my playlist", "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" } ] }

응답의 예

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

요청 예제

DELETE /api/playlists/1 HTTP/1.1 Accept: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

응답의 예

HTTP/1.1 200 Content-Type: application/json {}