환경설정 API - Amazon Managed Grafana

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

환경설정 API

기본 설정 API를 사용하여 Amazon Managed Grafana 작업 영역에서 사용자 기본 설정을 처리할 수 있습니다.

키:

  • 테마 — 유효한 값은light, 또는 빈 문자열이며dark, 기본 테마를 사용하려면 빈 문자열입니다.

  • homeDashboardId— 즐겨찾는 :id 대시보드의 숫자입니다. 기본값은 0입니다.

  • 시간대 — 유효한 값은 utcbrowser, 또는 빈 문자열을 사용하여 기본값을 사용합니다.

키를 생략하면 현재 값이 시스템 기본값으로 대체됩니다.

참고

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

현재 사용자 환경설정 가져오기

GET /api/user/preferences

요청 예제

GET /api/user/preferences HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

응답의 예

HTTP/1.1 200 Content-Type: application/json {"theme":"","homeDashboardId":0,"timezone":""}

현재 사용자 환경설정 업데이트

PUT /api/user/preferences

요청 예제

PUT /api/user/preferences HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk { "theme": "", "homeDashboardId":0, "timezone":"utc" }

응답의 예

HTTP/1.1 200 Content-Type: text/plain; charset=utf-8 {"message":"Preferences updated"}

현재 조직 환경설정 가져오기

GET /api/org/preferences

요청 예제

GET /api/org/preferences HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

응답의 예

HTTP/1.1 200 Content-Type: application/json {"theme":"","homeDashboardId":0,"timezone":""}

현재 조직 환경설정 업데이트

PUT /api/org/preferences

요청 예제

PUT /api/org/preferences HTTP/1.1 Accept: application/json Content-Type: application/json Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk { "theme": "", "homeDashboardId":0, "timezone":"utc" }

응답의 예

HTTP/1.1 200 Content-Type: text/plain; charset=utf-8 {"message":"Preferences updated"}