API özelliklerine genel bir bakış için Chrome Management App Details API (Chrome Yönetimi Uygulama Ayrıntıları API'si) sayfasını ziyaret edin.
Aşağıda gösterilen tüm istekler aşağıdaki değişkenleri kullanır:
$TOKEN
- OAuth 2 jetonu$CUSTOMER
- Müşterinin kimliği veya harflerden oluşanmy_customer
Bir Chrome uygulaması / uzantısıyla ilgili ayrıntıları alma
Belirli bir Chrome uygulamasıyla ilgili ayrıntıları görüntülemek için /apps/chrome/{app_id}@{app_version}
uç noktasını kullanın.
İstek
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/apps/chrome/abcdefghijklmnopqrstuvwxyzabcdef@1.2.3"
Yanıt
{
"name": "customers/<customer>/apps/chrome/abcdefghijklmnopqrstuvwxyzabcdef@1.2.3",
"displayName": "Sample Google Chrome Extension",
"description": "A sample Google Chrome extension.",
"revisionId": "1.2.3",
"type": "CHROME",
"iconUri": "https://sample.chrome.extension.google.com/icon.png",
"detailUri": "https://chrome.google.com/webstore/detail/abcdefghijklmnopqrstuvwxyzabcdef",
"firstPublishTime": "2010-10-10T10:10:10.123456Z",
"latestPublishTime": "2020-10-10T10:10:10.123456Z",
"publisher": "sample.com",
"homepageUri": "http://sample.chrome.extension.google.com/home",
"reviewNumber": "10000",
"reviewRating": 4.5,
"chromeAppInfo": {
"supportEnabled": false,
"minUserCount": 6000000,
"permissions": [
{
"type": "content_security_policy",
"documentationUri": "https://developer.chrome.com/extensions/contentSecurityPolicy",
"accessUserData": false
},
{
"type": "contextmenus",
"documentationUri": "https://developer.chrome.com/extensions/contextMenus",
"accessUserData": false
},
],
"siteAccess": [
{
"hostMatch": "<all_urls>"
}
],
"isTheme": false,
"googleOwned": true,
"isCwsHosted": true
}
}
Bir Android uygulamasıyla ilgili ayrıntıları alma
Belirli bir Android uygulamasıyla ilgili ayrıntıları görüntülemek için /apps/android/{app_id}@{app_version}
uç noktasını kullanın.
İstek
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/apps/android/com.google.android.sample@1.2.3"
Yanıt
{
"name": "customers/<customer>/apps/android/com.google.android.sample@1.2.3",
"displayName": "Sample Android App",
"description": "A sample Android app.",
"appId": "com.google.android.sample",
"revisionId": "1.2.3",
"type": "ANDROID",
"iconUri": "https://sample.android.app.google.com/icon.png",
"detailUri": "https://play.google.com/store/apps/details?id=com.google.android.sample",
"firstPublishTime": "2010-10-10T10:10:10.123456Z",
"latestPublishTime": "2020-10-10T10:10:10.123456Z",
"publisher": "Google LLC",
"isPaidApp": true,
"homepageUri": "http://sample.android.app.google.com/home",
"privacyPolicyUri": "http://sample.android.app.google.com/privacy",
"reviewNumber": "10000",
"reviewRating": 4.5,
"androidAppInfo": {
"permissions": [
{
"type": "android.permission.CAMERA"
},
]
}
}
Progresif Web Uygulaması (Progresif Web Uygulaması) ile ilgili ayrıntıları öğrenme
Belirli bir Prgoressive Web Uygulaması ile ilgili ayrıntıları görüntülemek için /apps/web/{app_id}
uç noktasını kullanın.
Uygulama kimliğinin, URL kodlamalı uygulama ana sayfası olduğunu unutmayın.
İstek
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/apps/web/http%3A%2F%2Fsample.web.app.google.com%2F"
Yanıt
{
"name": "customers/<customer>/apps/web/http%3A%2F%sample.web.app.google.com%2F",
"displayName": "sample.web.app.google.com",
"description": "A sample Progressive Web App.",
"appId": "http://sample.web.app.google.com/",
"type": "WEB",
"iconUri": "http://sample.web.app.google.com/icon.png"
}
İstenen Chrome uzantılarını listeleme
İstenen Chrome uygulamalarını listelemek için /apps:countChromeAppRequests
uç noktasını kullanın.
İstek
curl -X GET \
-H "Authorization: Bearer $TOKEN" \
"https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/apps:countChromeAppRequests"
Yanıt
{
"requestedApps": [
{
"appId": "abcdefghijklmnopqrstuvwxyzabcdef",
"displayName": "Sample Google Chrome Extension",
"appDetails": "customers/<customer>/apps/chrome/abcdefghijklmnopqrstuvwxyzabcdef",
"iconUri": "https://sample.chrome.extension.google.com/icon.png",
"detailUri": "https://chrome.google.com/webstore/detail/abcdefghijklmnopqrstuvwxyzabcdef",
"requestCount": "1",
"latestRequestTime": "2020-10-10T10:10:10.123456Z"
},
],
"totalSize": 1
}
Uzantı istekleriyle ilgili işlem yapma
Son kullanıcılardan gelen uygulama istekleriyle ilgili uygun işlemi yapmak için Chrome Policy API'yi kullanmanız gerekir. API'ye erişmek için kurulum kılavuzundaki talimatları uygulayın. Ardından, çeşitli işlemler yapmak için söz konusu API'ye istekte bulunabilirsiniz. Uygulamayla ilgili istekte bulunma örneklerini burada bulabilirsiniz. Aşağıda, uygulama isteklerinde gerçekleştirebileceğiniz yaygın işlemlere örnekler verilmiştir.
Bir kuruluş birimindeki kullanıcılar/cihazlar tarafından manuel yükleme için uzantı isteğini onaylayın
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
requests: [{
policyTargetKey: {
targetResource: "orgunits/04fatzly4jbjho9",
additionalTargetKeys: {"app_id": "chrome:abcdefghijklmnopqrstuvwxyzabcdef"}
},
policyValue: {
policySchema: "chrome.users.apps.InstallType",
value: {appInstallType: "ALLOWED"}
},
updateMask: {paths: "appInstallType"}
}]
}' \
"https://chromepolicy.googleapis.com/v1/customers/$CUSTOMER/policies/orgunits:batchModify"
Başarılı bir yanıt boş olmalıdır:
{}
Bir kuruluş birimindeki tüm kullanıcılar/cihazlar için ek süre isteğini reddedin
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
requests: [{
policyTargetKey: {
targetResource: "orgunits/04fatzly4jbjho9",
additionalTargetKeys: {"app_id": "chrome:abcdefghijklmnopqrstuvwxyzabcdef"}
},
policyValue: {
policySchema: "chrome.users.apps.InstallType",
value: {appInstallType: "BLOCKED"}
},
updateMask: {paths: "appInstallType"}
}]
}' \
"https://chromepolicy.googleapis.com/v1/customers/$CUSTOMER/policies/orgunits:batchModify"
Başarılı bir yanıt boş olmalıdır:
{}
Uzantıyı bir kuruluş birimindeki tüm kullanıcılar/cihazlar için zorunlu olarak yükle
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
requests: [{
policyTargetKey: {
targetResource: "orgunits/04fatzly4jbjho9",
additionalTargetKeys: {"app_id": "chrome:abcdefghijklmnopqrstuvwxyzabcdef"}
},
policyValue: {
policySchema: "chrome.users.apps.InstallType",
value: {appInstallType: "FORCED"}
},
updateMask: {paths: "appInstallType"}
}]
}' \
"https://chromepolicy.googleapis.com/v1/customers/$CUSTOMER/policies/orgunits:batchModify"
Başarılı bir yanıt boş olmalıdır:
{}