取得合作夥伴授權部署資訊
如何取得匯總以包含所有客戶的合作夥伴授權部署資訊。
注意
取得 授權部署資訊會取代此案例。
必要條件
認證,如合作夥伴中心驗證所述。 此案例支援使用應用程式加上使用者的認證來進行驗證。
C#
若要擷取授權部署上的匯總資料,請先從 IAggregatePartner.Analytics 屬性取得合作夥伴層級分析集合作業的介面。 然後,從 Licenses 屬性擷取合作夥伴層級授權分析集合的介面。 最後,呼叫 Deployment.Get 方法來取得授權部署的匯總資料。 如果方法成功,您將取得 PartnerLicensesDeploymentInsights 物件的集合。
// IAggregatePartner partnerOperations;
var partnerLicensesDeploymentAnalytics = partnerOperations.Analytics.Licenses.Deployment.Get();
REST 要求
要求的語法
方法 | 要求 URI |
---|---|
GET | {baseURL}/v1/analytics/licenses/deployment HTTP/1.1 |
要求標頭
如需詳細資訊,請參閱合作夥伴中心 REST 標頭。
要求本文
無。
要求範例
GET https://api.partnercenter.microsoft.com/v1/analytics/licenses/deployment HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 25b6edd5-1f53-456b-b48c-c64f60ec2dda
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Host: api.partnercenter.microsoft.com
REST 回應
如果成功,回應本文會包含 PartnerLicensesDeploymentInsights 資源的集合,可提供所部署授權的相關資訊。
回應成功和錯誤碼
每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心的 REST 錯誤碼。
回應範例
HTTP/1.1 200 OK
Content-Length: 487
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 25b6edd5-1f53-456b-b48c-c64f60ec2dda
MS-CV: f0trvmq8mEScHcFS.0
MS-ServerId: 102030524
Date: Tue, 14 Mar 2017 17:55:01 GMT
{
"totalCount": 2,
"items": [{
"proratedDeploymentPercent": 0.0,
"licensesSold": 343,
"processedDateTime": "2017-03-10T00:00:00+00:00",
"serviceName": "crm",
"channel": "reseller",
"attributes": {
"objectType": "PartnerLicensesDeploymentInsights"
}
}, {
"proratedDeploymentPercent": 1.0,
"licensesSold": 4464,
"processedDateTime": "2017-03-14T03:25:16.36+00:00",
"serviceName": "o365",
"channel": "reseller",
"attributes": {
"objectType": "PartnerLicensesDeploymentInsights"
}
}
],
"attributes": {
"objectType": "Collection"
}
}