기본 설정 API - Amazon Managed Grafana

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

기본 설정 API

기본 설정 API를 사용하여 Amazon Managed Grafana 워크스페이스에서 사용자 기본 설정에 대한 작업을 수행합니다.

키:

  • theme - 유효한 값은 light, dark 또는 빈 문자열(기본 테마 사용)입니다.

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

  • timezone - 유효한 값은 utc, browser 또는 빈 문자열(기본값 사용)입니다.

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

참고

Amazon Managed Grafana 워크스페이스에서 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"}