Chrome Management Reports API용 코드 샘플
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Chrome Management Reports API에서 다음을 확인하세요.
API 기능의 개요를 살펴봅니다.
아래에 표시된 모든 요청은 다음 변수를 사용합니다.
$TOKEN
- OAuth 2 토큰
$CUSTOMER
- 고객 또는 리터럴 my_customer
의 ID입니다.
$ORG_UNIT_ID
- 요청을 생성하려는 조직 단위의 ID입니다.
특정 기간 동안 활성 상태인 Chrome 버전 수 수
특정 기간 동안 활성화된 Chrome 버전을 보려면
filter
매개변수에 last_active_date
값을 사용합니다. 사용자는
pageSize
및 pageToken
매개변수를 사용하여 결과를 페이지로 나눕니다.
요청
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:countChromeVersions?filter=last_active_date<2020-11-06+AND+last_active_date>2020-11-04"
응답
{
"browserVersions": [
{
"count": "1",
"version": "85.0.4183.83",
"system": "SYSTEM_MAC",
"channel": "STABLE"
},
{
"count": "1",
"version": "85.0.4183.102",
"system": "SYSTEM_WINDOWS",
"channel": "STABLE"
},
{
"count": "13697",
"version": "71.0.3578.96",
"system": "SYSTEM_MAC",
"channel": "STABLE"
},
{
"count": "1",
"version": "87.0.4280.40",
"system": "SYSTEM_MAC",
"channel": "BETA"
},
{
"count": "1",
"version": "88.0.4314.0",
"system": "SYSTEM_MAC",
"channel": "CANARY"
},
{
"count": "1718"
},
],
"totalSize": 5
}
여러 권한을 사용하여 앱 설치 분포를 계산합니다.
특정 앱으로 특정 앱을 설치한 기기의 수를
사용하려면 number_of_permissions
값을
filter
매개변수
pageSize
및 pageToken
매개변수
더 많은 필터 매개변수를 보려면
참조.
요청
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:countInstalledApps?filter=number_of_permissions>6"
응답
{
"totalSize": 1,
"installedApps": [
{
"browserDeviceCount": "2",
"appSource": "CHROME_WEBSTORE",
"displayName": "Secure Shell App",
"description": "Terminal emulator and SSH and SFTP client.",
"appType": "APP",
"appInstallType": "ADMIN",
"appId": "pnhechapfaindjhompbnflcldabbghjo",
"homepageUri": "https://chrome.google.com/webstore/detail/pnhechapfaindjhompbnflcldabbghjo",
"permissions": [
"clipboardRead",
"clipboardWrite",
"crashReportPrivate",
"idle",
"metricsPrivate",
"notifications",
"storage",
"unlimitedStorage"
]
},
]
}
앱이 설치된 기기 수 계산
이전 예는 2대의 기기에 설치된 앱을 보여주었습니다.
이 앱이 설치된 기기를 보려면
findInstalledAppDevices
맞춤 메서드를 제공합니다.
pageSize
및 pageToken
를 사용하여 결과의 페이지로 나누기를 제어할 수 있습니다.
매개변수입니다.
요청
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:findInstalledAppDevices?appType=app&appId=pnhechapfaindjhompbnflcldabbghjo"
응답
{
"totalSize": 2,
"devices": [
{
"machine": "MACHINEA-A",
"deviceId": "b472473e-fe50-4c6e-9ac3-03fe0d0753ce"
},
{
"machine": "MACHINE-B",
"deviceId": "a5f49e54-b07b-409f-bc5c-aaf27c483249"
}
]
}
후속 요청
이전 예에서 반환된 기기 ID를 사용하면
앱이 설치된 기기에 대한 정보는
Chrome 브라우저용 Admin SDK Directory API
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eUse the Chrome Management Reports API to retrieve data on Chrome browser and app usage within your organization.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows you to count Chrome versions active within a specified date range, filter by criteria like the number of app permissions, and identify devices with specific apps installed.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003ecountChromeVersions\u003c/code\u003e, \u003ccode\u003ecountInstalledApps\u003c/code\u003e, and \u003ccode\u003efindInstalledAppDevices\u003c/code\u003e methods for gathering data insights.\u003c/p\u003e\n"],["\u003cp\u003eDetailed information about specific devices can be retrieved through the Admin SDK Directory API using the device ID.\u003c/p\u003e\n"]]],[],null,["# Code Samples for the Chrome Management Reports API\n\nVisit [Chrome Management Reports API](/chrome/management/guides/reports_api) for\nan overview of API features.\n\nAll the requests shown below use the following variables:\n\n- `$TOKEN` - OAuth 2 token\n- `$CUSTOMER` - ID of the customer or literal `my_customer`\n- `$ORG_UNIT_ID` - ID of a particluar org unit for which you want to generate a request.\n\nCount Chrome versions active in date range\n------------------------------------------\n\nTo view which Chrome versions were active over a given range of time,\nuse the `last_active_date` value in the `filter` parameter. You can control\npagination of the results using the `pageSize` and `pageToken` parameters.\n\n#### Request\n\n curl -X GET \\\n -H \"Authorization: Bearer $TOKEN\" \\\n \"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:countChromeVersions?filter=last_active_date\u003c2020-11-06+AND+last_active_date\u003e2020-11-04\"\n\n#### Response\n\n {\n \"browserVersions\": [\n {\n \"count\": \"1\",\n \"version\": \"85.0.4183.83\",\n \"system\": \"SYSTEM_MAC\",\n \"channel\": \"STABLE\"\n },\n {\n \"count\": \"1\",\n \"version\": \"85.0.4183.102\",\n \"system\": \"SYSTEM_WINDOWS\",\n \"channel\": \"STABLE\"\n },\n {\n \"count\": \"13697\",\n \"version\": \"71.0.3578.96\",\n \"system\": \"SYSTEM_MAC\",\n \"channel\": \"STABLE\"\n },\n {\n \"count\": \"1\",\n \"version\": \"87.0.4280.40\",\n \"system\": \"SYSTEM_MAC\",\n \"channel\": \"BETA\"\n },\n {\n \"count\": \"1\",\n \"version\": \"88.0.4314.0\",\n \"system\": \"SYSTEM_MAC\",\n \"channel\": \"CANARY\"\n },\n {\n \"count\": \"1718\"\n },\n ],\n \"totalSize\": 5\n }\n\nCount distribution of app installations with a number of permissions\n--------------------------------------------------------------------\n\nTo view the number of devices that have installed a particular app with a given\nnumber of permissions, use the `number_of_permissions` value in the\n`filter` parameter. You can control pagination of the results using the\n`pageSize` and `pageToken` parameters.\n\nFor more filter parameters, visit the\n[reference](/chrome/management/reference/rest/v1/customers.reports/countInstalledApps).\n\n#### Request\n\n curl -X GET \\\n -H \"Authorization: Bearer $TOKEN\" \\\n \"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:countInstalledApps?filter=number_of_permissions\u003e6\"\n\n#### Response\n\n {\n \"totalSize\": 1,\n \"installedApps\": [\n {\n \"browserDeviceCount\": \"2\",\n \"appSource\": \"CHROME_WEBSTORE\",\n \"displayName\": \"Secure Shell App\",\n \"description\": \"Terminal emulator and SSH and SFTP client.\",\n \"appType\": \"APP\",\n \"appInstallType\": \"ADMIN\",\n \"appId\": \"pnhechapfaindjhompbnflcldabbghjo\",\n \"homepageUri\": \"https://chrome.google.com/webstore/detail/pnhechapfaindjhompbnflcldabbghjo\",\n \"permissions\": [\n \"clipboardRead\",\n \"clipboardWrite\",\n \"crashReportPrivate\",\n \"idle\",\n \"metricsPrivate\",\n \"notifications\",\n \"storage\",\n \"unlimitedStorage\"\n ]\n },\n ]\n }\n\nCount devices that have an installed app\n----------------------------------------\n\nThe previous example showed an app that has been installed on 2 devices.\nTo view the devices that have installed this app, you can use the\n`findInstalledAppDevices` custom method.\nYou can control pagination of the results using the `pageSize` and `pageToken`\nparameters.\n\n#### Request\n\n curl -X GET \\\n -H \"Authorization: Bearer $TOKEN\" \\\n \"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/reports:findInstalledAppDevices?appType=app&appId=pnhechapfaindjhompbnflcldabbghjo\"\n\n#### Response\n\n {\n \"totalSize\": 2,\n \"devices\": [\n {\n \"machine\": \"MACHINEA-A\",\n \"deviceId\": \"b472473e-fe50-4c6e-9ac3-03fe0d0753ce\"\n },\n {\n \"machine\": \"MACHINE-B\",\n \"deviceId\": \"a5f49e54-b07b-409f-bc5c-aaf27c483249\"\n }\n ]\n }\n\n### Follow-up request\n\nGiven the device ID returned in the previous example, you can get more\ninformation about the device that has installed the app by using the\n[Admin SDK Directory API for Chrome Browsers](/admin-sdk/directory/v1/guides/manage-chrome-browsers)."]]