如要概略瞭解 API 功能,請前往 Customer Subscriptions API。
這個頁面上的所有要求都會使用下列變數:
$TOKEN- OAuth2 權杖$CUSTOMER- 客戶 ID (例如C01234567) 或字面值my_customer
取得顧客訂閱資訊
取得客戶的匯總訂閱和授權資訊。
要求
curl -H "Authorization: Bearer $TOKEN" \
https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/subscriptionInfo
您也可以使用 my_customer 別名,擷取呼叫者自有網域的訂閱資訊:
curl -H "Authorization: Bearer $TOKEN" \
https://chromemanagement.googleapis.com/v1/customers/my_customer/subscriptionInfo
回應
{
"name": "customers/$CUSTOMER/subscriptionInfo",
"chromeEnterpriseUpgradeAnnual": {
"counts": {
"totalPurchasedCount": "300",
"assignedCount": "3",
"unassignedCount": "297"
},
"subscriptionEndTime": "2027-08-15T12:00:00Z"
},
"kioskSignageUpgradeAnnual": {
"counts": {
"totalPurchasedCount": "10",
"assignedCount": "4",
"unassignedCount": "6"
},
"subscriptionEndTime": "2027-08-15T12:00:00Z"
},
"chromePerpetualUpgrade": {
"counts": {
"totalPurchasedCount": "10",
"assignedCount": "10",
"unassignedCount": "0"
},
"retiredCount": "2",
"conditionallyAvailableCount": "2"
}
}