Get Usage V1
Select
Usage API Documentation
Overview
The Usage API provides a way to obtain usage data with various search parameters. Please note that all dates in the Usage API refer to the UTC time zone. Usage data on each usage date shows the peak usage up to that usage date in the current calendar month.
Usage Collection Schedule
Usage collection runs at 4 am UTC every day for yesterday's usage data. It is suggested for partners to call the Usage API for yesterday's data after 6 am UTC.
Usage Retrieval
Partners can either:
- Directly call the API with no parameters to get usage data for yesterday (current calendar month peak usage up to yesterday).
- Specify date parameters to get historical peak usage data.
Database Usage
Database usage is metered by capacity unless the application is hosted on virtual machines, in which case it is metered as a VM instance.
File & Object Usage
File & Object usage is metered by capacity unless the application is hosted on Virtual Machines, in which case it is metered as a VM instance.
Metallic Backup for Microsoft 365 Service
Metallic Backup for Microsoft 365 service will incur storage usage. Each user with Metallic Backup for Microsoft 365 Standard (Not including no storage option) will have 5 GB storage capacity included, and each user with Metallic Backup for Microsoft 365 Standard (Not including no storage option) will have 50 GB storage capacity included.
Storage Usage Calculation Examples
Example 1:
Customer had 100 Standard users, 100 Enterprise users, and 5000 GB storage reported in usage.
- Storage included quantity: 100 5 + 100 50 = 5500 GB
- Since 5000 GB < 5500 GB, no storage usage will be charged.
Example 2:
Customer had 100 Standard users, 100 Enterprise users, and 6000 GB storage reported in usage.
- Storage included quantity: 100 5 + 100 50 = 5500 GB
- Since 6000 GB > 5500 GB, 500 GB storage usage will be charged.
Usage API Response
In the Usage API response, storage quantity will be shown in TB.
Response Body
Field | Description | Type | Notes |
---|---|---|---|
data | List of usage details | Usage Objects Array | See - Usage Object |
metadata | List usage metadata | Metadata Object | See - Metadata Object |
Usage Object
Field | Description | Type | Notes |
---|---|---|---|
usageDate | Date of this usage object | Date (YYYY-MM-DD) | Usage Data on usageDate means peak usage up to usageDate in current calendar month. |
accountId | Account metallic id | UUID | |
externalAccountId | Account id in partner system | String / UUID | |
fulfillmentId | Fulfillment metallic id | UUID | |
externalFulfillmentId | Fulfillment id in partner system | String / UUID | |
skuId | Service sku in metallic | String | |
consumedQuantity | Usage quantity | Double | It shows peak usage quantity that was consumed up to usageDate in current calendar month. |
chargeableQuantity | Chargeable quantity | Double | Quantity that would be used for billing. |
billingUnit | Unit of measure (1 user, 10 vm, etc. | String | See - Billing Units Explained |
billingQuantity | Quantity for billing | Double | Ceiling of (chargeableQuantity / billingUnit) |
unitPrice | Price for a single billingUnit | Double | |
totalCost | Total cost | Double | billingQuantity * unitPrice |
currency | Billing currency | String |
Metadata Object
Field | Description | Type | Notes |
---|---|---|---|
filter | Filter string that contains search parameters | String | |
sort | Sort string that contains sorting criteria | String | |
pagination | Pagination Info | Pagination Object | See - Pagination Object |
Pagination Object
Field | Description | Type | Notes |
---|---|---|---|
pageNumber | Page number | Integer | 0 to x |
pageSize | Page size | Integer | |
totalRecords | Total number of records | Integer |
Query Parameters
- startDate string
Optional - The date from which usage is returned. startDate is inclusive UTC time zone Format "YYYY-MM-DD". If not provided, defaults to yesterday
- endDate string
Optional - The date to which usage is returned. endDate is exclusive UTC time zone Format "YYYY-MM-DD". If not provided, defaults to today
- accountId string
Optional - Metallic account id.
- fulfillmentId string
Optional - Metallic fulfillment id.
- pageNumber int32
Optional - Page number >= 0. default 0
- pageSize int32
Optional - Page size, default 100
- 200
OK
- application/json
- Schema
- Get Usage - Success - Single Account
- Get Usage - Success - Single Account for Date Range
- Example 1
Schema
{
"data": [
{
"usageDate": "2021-02-07",
"accountId": "c97aca56-88f8-43af-8c24-0fb6ef0552b5",
"externalAccountId": "partnerxyz",
"fulfillmentId": "c640d069-9b20-41e7-bac7-b3a2af3a8729",
"externalFulfillmentId": "xyzw",
"skuId": "MTL-VMKB-VM10O-NC",
"consumedQuantity": 77,
"chargeableQuantity": 77,
"billingUnit": "10 vm",
"billingQuantity": 8,
"unitPrice": 4,
"totalCost": 32,
"currency": "USD"
}
]
}
{
"data": [
{
"usageDate": "2021-07-23",
"accountId": "cdb8a2a3-582b-449e-84fa-3c4f6a1745df",
"externalAccountId": "partnerxyz",
"fulfillmentId": "234477b5-7d7d-46a8-9eb7-ac67d8d87f58",
"externalFulfillmentId": "partnerabcdef",
"skuId": "MTL-O365-USRO-NC",
"consumedQuantity": 100,
"chargeableQuantity": 100,
"billingUnit": "1 user",
"billingQuantity": 100,
"unitPrice": 4,
"totalCost": 400,
"currency": "USD"
},
{
"usageDate": "2021-07-23",
"accountId": "cdb8a2a3-582b-449e-84fa-3c4f6a1745df",
"externalAccountId": "partnerxyz",
"fulfillmentId": "234477b5-7d7d-46a8-9eb7-ac67d8d87f58",
"externalFulfillmentId": "partnerabcdef",
"skuId": "MTL-VMKB-VM10O-NC",
"consumedQuantity": 100,
"chargeableQuantity": 85,
"billingUnit": "10 vm",
"billingQuantity": 10,
"unitPrice": 3,
"totalCost": 27,
"currency": "USD"
},
{
"usageDate": "2021-07-24",
"accountId": "cdb8a2a3-582b-449e-84fa-3c4f6a1745df",
"externalAccountId": "partnerxyz",
"fulfillmentId": "234477b5-7d7d-46a8-9eb7-ac67d8d87f58",
"externalFulfillmentId": "partnerabcdef",
"skuId": "MTL-O365-USRO-NC",
"consumedQuantity": 110,
"chargeableQuantity": 110,
"billingUnit": "1 user",
"billingQuantity": 110,
"unitPrice": 4,
"totalCost": 440,
"currency": "USD"
},
{
"usageDate": "2021-07-24",
"accountId": "cdb8a2a3-582b-449e-84fa-3c4f6a1745df",
"externalAccountId": "partnerxyz",
"fulfillmentId": "234477b5-7d7d-46a8-9eb7-ac67d8d87f58",
"externalFulfillmentId": "partnerabcdef",
"skuId": "MTL-VMKB-VM10O-NC",
"consumedQuantity": 120,
"chargeableQuantity": 100,
"billingUnit": "10 vm",
"billingQuantity": 10,
"unitPrice": 3,
"totalCost": 30,
"currency": "USD"
}
]
}