Alert Center API를 사용하면 도메인에 영향을 미치는 알림을 관리할 수 있습니다.
알림은 Google에서 감지한 잠재적인 보안 문제에 대한 경고입니다.
알림에는 다음 정보가 포함됩니다.
알림이 시작된 소스입니다.
경고의 이름입니다.
이 알림이 발생한 시간입니다.
이 알림과 관련된 특정 데이터입니다.
도메인 관리자는 Google 관리 콘솔에서 수동으로 알림을 확인하고 관리할 수 있습니다. Alert Center API를 사용하면 빌드한 앱을 통해 알림 데이터 및 알림 피드백을 가져올 수 있습니다. API는 또한 기존 알림에 대한 새 알림 피드백을 만들 수도 있습니다.
예를 들어 모니터링 앱에서 Alert Center API로 도메인의 최근 알림을 검색하여 우선순위를 지정하고 조직의 구성원에게 알릴 수 있습니다. 팀에서 알림에 응답한 후 결과에 따라 앱에서 의견을 알림에 첨부할 수 있습니다.
앱에 사전 요구사항을 충족하고 적절하게 승인된 Cloud 프로젝트가 있으면 Alert Center API REST 요청을 할 수 있습니다. 사용 가능한 클라이언트 라이브러리를 사용하면 API 요청을 더 쉽게 할 수 있습니다.
다음 예시에서는 API를 사용하여 사용 가능한 알림을 나열하는 방법을 보여줍니다.
자바
// First, authorize the API and create a client to make requests with.URLserviceAccountUrl=AuthUtils.class.getResource("/client_secret.json");GoogleCredentialscredentials=ServiceAccountCredentials.fromStream(serviceAccountUrl.openStream()).createDelegated("admin@xxxx.com").createScoped(Collections.singleton("https://www.googleapis.com/auth/apps.alerts"));ApacheHttpTransporttransport=newApacheHttpTransport();HttpCredentialsAdapteradapter=newHttpCredentialsAdapter(credentials);AlertCenteralertCenter=newAlertCenter.Builder(transport,newJacksonFactory(),adapter).setApplicationName("Alert Center client").build();// List alerts in pages, printing each alert discovered.StringpageToken=null;do{ListAlertsResponselistResponse=service.alerts().list().setPageToken(pageToken).setPageSize(20).execute();if(listResponse.getAlerts()!=null){for(Alertalert:listResponse.getAlerts()){System.out.println(alert);}}pageToken=listResponse.getNextPageToken();}while(pageToken!=null);
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Overview\n\nThe Alert Center API lets you manage *alerts* affecting your domain.\nAn alert is a warning of a potential security issue that Google has detected.\nAlerts include the following information:\n\n- Source that the alert originated from.\n- Name of the alert.\n- Time this alert happened.\n- Specific data associated with this alert.\n\nDomain administrators can see and manage alerts manually from the\n[Google Admin console](https://support.google.com/a/topic/2413312). The\nAlert Center API lets apps you build retrieve alert data and alert feedback. The\nAPI can also create new alert feedback for existing alerts.\n\nFor example, a monitoring app could use the Alert Center API to retrieve the\nmost recent alerts for a domain, prioritize them, and then notify members\nof your organization. After your team responds to the alert, the app could then\nattach feedback to the alert based on their findings.\n\nUse Alert Center API\n--------------------\n\n| **Note:** The current version of this API (v1beta1) is available to all Google Workspace customers.\n\nBefore using the Alert Center API you need to set up\n[a new Cloud Platform project and enable Alert Center API](/workspace/admin/alertcenter/guides/prerequisites).\nYour project must use a [service account](/identity/protocols/OAuth2ServiceAccount)\nwhen accessing the API.\n\nOnce your app has a Cloud project that meets the prerequisites and is properly\n[authorized](/workspace/admin/alertcenter/guides/authorizing), it can make\nAlert Center API REST requests. Making API requests is easier when using the\navailable [client libraries](/workspace/admin/alertcenter/guides/libraries).\n\nThe following example shows how to list available alerts using the API: \n\n### Java\n\n```java\n// First, authorize the API and create a client to make requests with.\nURL serviceAccountUrl = AuthUtils.class.getResource(\"/client_secret.json\");\nGoogleCredentials credentials = ServiceAccountCredentials\n .fromStream(serviceAccountUrl.openStream())\n .createDelegated(\"admin@xxxx.com\")\n .createScoped(Collections.singleton(\"https://www.googleapis.com/auth/apps.alerts\"));\nApacheHttpTransport transport = new ApacheHttpTransport();\nHttpCredentialsAdapter adapter = new HttpCredentialsAdapter(credentials);\nAlertCenter alertCenter = new AlertCenter.Builder(transport, new JacksonFactory(), adapter)\n .setApplicationName(\"Alert Center client\")\n .build();\n\n// List alerts in pages, printing each alert discovered.\nString pageToken = null;\ndo {\n ListAlertsResponse listResponse = service.alerts().list().setPageToken(pageToken)\n .setPageSize(20).execute();\n if (listResponse.getAlerts() != null) {\n for (Alert alert : listResponse.getAlerts()) {\n System.out.println(alert);\n }\n }\n pageToken = listResponse.getNextPageToken();\n} while (pageToken != null);\n \n```"]]