Thank you so much API is working and I am able to get output results.
I checked with "Get costs overview for the organization" and getting correct values for current values which are billed till today for the current month.
curl -XGET https://api.elastic-cloud.com/api/v1/billing/costs/<organization_id> \
-H "Authorization: ApiKey <yourapikey>"
{
"costs" : {
"total" : 55.5166,
"resources" : 40.8226,
"data_transfer_and_storage" : 14.694
},
"trials" : 0.0,
"hourly_rate" : 0.1989,
"balance" : {
"available" : 0.0,
"remaining" : 0.0,
"line_items" : [
]
}
While I checked for "Get itemized costs for the organization" its showing different values from elastic.co billing and showing values for 734 hours instead it showing calculate hours from 1 st aug till today.
Is it forecasting the values of resources for the next 20 days?
curl -XGET https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id}/items
-H "Authorization: ApiKey API_KEY"
{
"costs" : {
"total" : 160.76,
"resources" : 146.0128,
"data_transfer_and_storage" : 14.7472
},
"resources" : [
{
"hours" : 734,
"instance_count" : 1,
"period" : {
"start" : "2021-08-01T00:00:00.000Z",
"end" : "2021-08-31T14:06:06.783Z"
},
"kind" : "apm",
"price" : 0.0,
"price_per_hour" : 0.0,
"name" : " <Name>" ",
"sku" : "<Name>"
},
{
"hours" : 734,
"instance_count" : 1,
"period" : {
"start" : "2021-08-01T00:00:00.000Z",
"end" : "2021-08-31T14:06:06.783Z"
},
"kind" : "elasticsearch",
"price" : 132.1383,
"price_per_hour" : 0.18,
"name" : "<NAME>",
"sku" : "<NAME>"
},
{
"hours" : 734,
"instance_count" : 1,
"period" : {
"start" : "2021-08-01T00:00:00.000Z",
"end" : "2021-08-31T14:06:06.783Z"
},
"kind" : "elasticsearch",
"price" : 13.8745,
"price_per_hour" : 0.0189,
"name" : "<NAME>",
"sku" : "<NAME>"
},
{
"hours" : 734,
"instance_count" : 1,
"period" : {
"start" : "2021-08-01T00:00:00.000Z",
"end" : "2021-08-31T14:06:06.783Z"
},
"kind" : "kibana",
"price" : 0.0,
"price_per_hour" : 0.0,
"name" : "<NAME>",
"sku" : "<NAME>"
}
]