- 16 Jul 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Get License Consumption Report
- Updated on 16 Jul 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Get details on license consumption for any CSP Tenant
URL
{{customerId}} – This is a mandatory parameter. Pass the C3 customer Id (local customer id generated by C3) to this parameter to get the details of a particular customer.
{{tenantid}} – This is a mandatory parameter. Pass the Microsoft customer Id to this parameter to get the details of a particular customer.
Request headers
Key | Value |
Authorization | Bearer <access_token> |
Content-Type | Application/json |
Request body
The request doesn’t require any parameters / body
Response body
An example response for the request to get active customers is as follows:
{
"OperationType": null,
"Status": "Success",
"RequestCorrelationID": "da879f7a-732a-4045-84bb-b1777a1ffc3c",
"ErrorMessage": null,
"ErrorDetail": null,
"Data": [
{
"ActiveUnits": 65,
"AvailableUnits": 5,
"TotalUnits": 65,
"ProducName": "Office 365 G1 GCC",
"ProductSkuId": "3f4babde-90ec-47c6-995d-d223749065d1",
"ConsumedUnits": 60,
"SubcriptionNames": " Office 365 G1 GCC(Monthly)"
},
{
"ActiveUnits": 2,
"AvailableUnits": 0,
"TotalUnits": 2,
"ProducName": "Visio Plan 2 for GCC",
"ProductSkuId": "4ae99959-6b0f-43b0-b1ce-68146001bdba",
"ConsumedUnits": 2,
"SubcriptionNames": " Visio Plan 2 for GCC(Monthly)"
},
Here is the explanation for the properties in the response (JSON)
Property | Description | ||||||||||||||||
OperationType | Can be ignored | ||||||||||||||||
Status | Indicates the status of the request. Possible values – Success / Error | ||||||||||||||||
RequestCorrelationID | Internal ID generated by C3 for correspondence for troubleshooting issues, if any. | ||||||||||||||||
ErrorMessage | Message in case the request runs into an error during processing | ||||||||||||||||
ErrorDetail | Additional detail related to the error in case there is an error while processing the request | ||||||||||||||||
Data | Contains a list of customer objects represented by the following attributes:
|
Error response
The API validates the input parameters – customer id and the tenant Ids and returns 400 – Bad request error in case the input is found to be invalid.
A sample bad request error covering both the attributes is as follows:
{
"OperationType": null,
"Status": "Error",
"RequestCorrelationID": "e002cf54-bbaf-4838-8a66-f016c70c907a",
"ErrorMessage": "ERROR_DESC_BAD_INPUT",
"ErrorDetail": "ERROR_DESC_BAD_INPUT",
"Data": [
{
"Atribute": "CustomerId",
"AtributeKey": "CUSTOMER_C3ID",
"Message": "INVALID_C3_CUSTOMER_ID",
"DefaultMessage": "Invalid c3 Customer ID",
"Value": "9582D9F2-1234945-AB56-DADED948C1C4"
},
{
"Atribute": "TenantId",
"AtributeKey": "TENANT_ID",
"Message": "INVALID_TENANT_ID",
"DefaultMessage": "Invalid tenant ID",
"Value": "0f96f6b1-fe7f-4322-567-152d0f2ff171"
}
]
Property | Description |
OperationType | Can be ignored |
Status | Indicates the status of the request. Possible values – Success / Error |
RequestCorrelationID | Internal ID generated by C3 for correspondence for troubleshooting issues, if any. |
ErrorMessage | Message in case the request runs into an error during processing |
ErrorDetail | Additional detail related to the error in case there is an error while processing the request |
Data | Contains a list of validation errors represented by the following attributes:
|