The Get monthly analytics method is used to get information about monthly expenses for a subscription. The target period can be specified using arbitrary dates or aligned to billing periods. The method returns amounts in the reseller currency. The response depends on the service.
GET {base_url}/api/v3/analytics_monthly
Arguments
Response model
|
Name |
Data type |
Description |
||||||
|---|---|---|---|---|---|---|---|---|
|
billing_periods |
array |
The list of billing periods (YYYY-MM) |
||||||
|
subscription |
object |
Information about the subscription |
||||||
|
|
id |
integer |
The subscription ID |
|||||
|
|
items |
array |
The list of resources and expenses |
|||||
|
|
|
resource_group |
string |
The resource name group |
||||
|
|
|
category |
string |
The resource category |
||||
|
|
|
resource_name |
string |
The resource name |
||||
|
|
|
tags |
array |
The list of resource tags |
||||
|
|
|
billing_period |
string |
The billing period (YYYY-MM) |
||||
|
|
|
total |
string |
The consumption amount |
||||
Request example
GET /api/v3/analytics_monthly?subscription_id=53840&period_from=2023-06&period_to=2023-07
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"billing_periods": [
"2023-06",
"2023-07"
],
"subscription": {
"id": "53840",
"items": [
{
"resource_group": "PDFParanaGLM",
"category": "Storage",
"resource_name": "Batch Write Operations",
"tags": [],
"billing_period": "2023-06",
"total": "0.0"
},
{
"resource_group": "PDFParanaGLM",
"category": "Storage",
"resource_name": "LRS Data Stored",
"tags": [],
"billing_period": "2023-06",
"total": "0.898459"
},
{
"resource_group": "RGLAN",
"category": "Virtual Machines",
"resource_name": "B2s",
"tags": [
"Veeam backup appliance ID: 2bkea35c-1243-abcd-9f12-ecc129f5f0d0",
"veeam01: dfgni2MJCI"
],
"billing_period": "2023-06",
"total": "0.150528"
}
]
}
}