API 機能の概要については、Chrome Management Profiles API をご覧ください。
このページに示されているリクエストでは、次の変数を使用します。
$TOKEN
- OAuth 2.0 トークン$CUSTOMER
- 顧客の ID またはリテラルmy_customer
管理対象プロファイルの一覧表示
マネージド プロファイルを一覧表示するには、/profiles
エンドポイントを使用します。pageSize
パラメータと pageToken
パラメータを使用すると、結果のページ分けを制御できます。orderBy
を使用して、結果の順序を指定します。filter
を指定して、結果をさらに絞り込みます。読み取りマスクは fields
クエリ パラメータで指定できます。reportingData
フィールドを除外する読み取りマスクを使用してプロファイルを一覧表示すると、効率が向上します。
リクエスト
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles?pageSize=2&orderBy=lastPolicySyncTime&filter=osPlatformType=WINDOWS+AND+affiliationState=PROFILE_ONLY&fields=chromeBrowserProfiles.name,chromeBrowserProfiles.profileId,chromeBrowserProfiles.profilePermanentId,chromeBrowserProfiles.displayName,chromeBrowserProfiles.userEmail,chromeBrowserProfiles.lastActivityTime,chromeBrowserProfiles.osPlatformType,chromeBrowserProfiles.policyCount,chromeBrowserProfiles.reportingData,chromeBrowserProfiles.identityProvider,chromeBrowserProfiles.affiliationState"
レスポンス
{
"chromeBrowserProfiles": [
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>",
"profileId": "<profileId1>",
"profilePermanentId": "<profilePermanentId1>",
"displayName": "My profile 1",
"userEmail": "<userEmail1>",
"lastActivityTime": "2024-04-23T22:05:44.214362Z",
"osPlatformType": "WINDOWS",
"policyCount": "2",
"reportingData": [
{
"browserExecutablePath": "<executablePath1>",
"profilePath": "<profilePath1>",
"extensionData":[
{
"extensionId": "ghbmnnjooekpmoecnnnilnnbdlolhkhi",
"version": "1.76.1",
"name": "Google Docs Offline",
"extensionType": "EXTENSION",
"homepageUri": "https://chrome.google.com/webstore/detail/ghbmnnjooekpmoecnnnilnnbdlolhkhi",
"installationType": "NORMAL",
"isDisabled": true,
"isWebstoreExtension": true,
"manifestVersion": 3
}
],
"policyData":[
{
"source": "MACHINE_PLATFORM",
"name": "AutoSelectCertificateForUrls",
"value": "\"********\""
},
{
"source": "USER_CLOUD",
"name": "BrowserThemeColor",
"value": "\"#00FF00\""
}
]
}
],
"identityProvider": "GOOGLE_IDENTITY_PROVIDER",
"affiliationState": "PROFILE_ONLY"
},
{
"name": "customers/<customerId>/profiles/<profilePermanentId2>",
"profileId": "<profileId2>",
"profilePermanentId": "<profilePermanentId2>",
"displayName": "My profile 2",
"userEmail": "<userEmail2>",
"lastActivityTime": "2024-04-23T22:05:44.214362Z",
"osPlatformType": "WINDOWS",
"policyCount": "1",
"reportingData": [
{
"browserExecutablePath": "<executablePath2>",
"profilePath": "<profilePath2>",
"policyData":[
{
"source": "USER_CLOUD",
"name": "CloudProfileReportingEnabled",
"value": "true"
}
]
}
],
"identityProvider": "GOOGLE_IDENTITY_PROVIDER",
"affiliationState": "PROFILE_ONLY"
}
],
"next_page_token": "<nextPageToken>",
"total_size": "120"
}
管理対象プロファイルを取得する
マネージド プロファイルを取得するには、/profiles/{profile_permanent_id}
エンドポイントを使用します。読み取りマスクは、fields
パラメータで指定できます。
リクエスト
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles/<profilePermanentId1>?fields=chromeBrowserProfiles.name,chromeBrowserProfiles.profileId,chromeBrowserProfiles.profilePermanentId,chromeBrowserProfiles.displayName,chromeBrowserProfiles.userEmail,chromeBrowserProfiles.lastActivityTime,chromeBrowserProfiles.osPlatformType,chromeBrowserProfiles.policyCount,chromeBrowserProfiles.reportingData,chromeBrowserProfiles.identityProvider,chromeBrowserProfiles.affiliationState"
レスポンス
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>",
"profileId": "<profileId1>",
"profilePermanentId": "<profilePermanentId1>",
"displayName": "My profile 1",
"userEmail": "<userEmail1>",
"lastActivityTime": "2024-04-23T22:05:44.214362Z",
"osPlatformType": "WINDOWS",
"policyCount": "2",
"reportingData": [
{
"browserExecutablePath": "<executablePath1>",
"profilePath": "<profilePath1>",
"extensionData":[
{
"extensionId": "ghbmnnjooekpmoecnnnilnnbdlolhkhi",
"version": "1.76.1",
"name": "Google Docs Offline",
"extensionType": "EXTENSION",
"homepageUri": "https://chrome.google.com/webstore/detail/ghbmnnjooekpmoecnnnilnnbdlolhkhi",
"installationType": "NORMAL",
"isDisabled": true,
"isWebstoreExtension": true,
"manifestVersion": 3
}
],
"policyData":[
{
"source": "MACHINE_PLATFORM",
"name": "AutoSelectCertificateForUrls",
"value": "\"********\""
},
{
"source": "USER_CLOUD",
"name": "BrowserThemeColor",
"value": "\"#00FF00\""
}
]
}
],
"identityProvider": "GOOGLE_IDENTITY_PROVIDER",
"affiliationState": "PROFILE_ONLY"
}
管理対象プロファイルから収集したデータを削除する
管理対象プロファイルから収集されたデータを削除するには、/profiles/{profile_permanent_id}
エンドポイントを使用します。
リクエスト
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles/<profilePermanentId1>"
管理対象プロファイルにリモート コマンドを発行する
管理対象プロファイルにリモート コマンドを発行するには、/profiles/{profile_permanent_id}/commands/
エンドポイントを使用します。
リクエスト
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
--data '{"command_type":"clearBrowsingData", "payload":{clearCache:true, clearCookies:true}}' \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles/<profilePermanentId1>/commands"
レスポンス
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>/commands/<commandId1>",
"commandType": "clear_browsing_data",
"payload": {
"clear_cache": true,
"clear_cookies": true
},
"commandState": "PENDING",
"issueTime": "2025-04-05T16:43:37.668Z",
"validDuration": "86400s"
}
管理対象プロファイルに発行されたリモート コマンドを取得する
管理対象プロファイルに発行されたリモート コマンドを取得するには、/profiles/{profile_permanent_id}/commands/{command_id}
エンドポイントを使用します。
リクエスト
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles/<profilePermanentId1>/commands/<commandId1>"
レスポンス
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>/commands/<commandId1>",
"commandType": "clear_browsing_data",
"payload": {
"clear_cache": true,
"clear_cookies": true
},
"commandState": "EXECUTED_BY_CLIENT",
"commandResult": {
"resultType": "SUCCESS",
"clientExecutionTime": "2025-04-05T14:01:51.082Z"
},
"issueTime": "2025-04-05T14:01:49.914Z",
"validDuration": "86400s"
}
管理対象プロファイルに発行されたリモート コマンドを一覧表示する
管理対象プロファイルに発行されたリモート コマンドを一覧表示するには、/profiles/{profile_permanent_id}/commands
エンドポイントを使用します。
リクエスト
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/profiles/<profilePermanentId1>/commands?pageSize=2"
レスポンス
{
"chromeBrowserProfileCommands": [
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>/commands/<commandId1>",
"commandType": "clear_browsing_data",
"payload": {
"clear_cache": true,
"clear_cookies": true
},
"commandState": "EXECUTED_BY_CLIENT",
"commandResult": {
"resultType": "SUCCESS",
"clientExecutionTime": "2025-04-05T14:01:51.082Z"
},
"issueTime": "2025-04-05T14:01:49.914Z",
"validDuration": "86400s"
},
{
"name": "customers/<customerId>/profiles/<profilePermanentId1>/commands/<commandId2>",
"commandType": "clear_browsing_data",
"payload": {
"clear_cache": true,
"clear_cookies": false
},
"commandState": "EXECUTED_BY_CLIENT",
"commandResult": {
"resultType": "SUCCESS",
"clientExecutionTime": "2025-04-05T14:02:59.981Z"
},
"issueTime": "2025-04-05T14:02:59.192Z",
"validDuration": "86400s"
}
],
"nextPageToken": "<nextPageToken>",
"totalSize": "10"
}