Billing Metrics Resource
A billing_metrics resource represents the metrics that are used to determine an organization's monthly bill. Some metrics have hourly values and some have monthly values. These metrics are only gathered for organization API calls (calls that require the "org" token) and entities.
Hourly Organization Metrics:
- bytesIn : The
number of bytes uploaded into GroveStreams in one hour. The byte
count is derived from the request body and the URI parameters.
- bytesOut : The
number of bytes downloaded from GroveStreams in one hour. The
byte count is derived from the response body.
- transactions :
The number of transactions with GroveStreams in one hour.
Monthly Organization Metrics:
- bytesIn : The
number of bytes uploaded into GroveStreams in one month. The byte
count is derived from the request body and the URI parameters.
- bytesOut : The
number of bytes downloaded from GroveStreams in one month. The
byte count is derived from the response body.
- transactions :
The number of transactions with GroveStreams in one month.
- intvlBytesStored
: The number of bytes used to store all stream interval values.
- streamCount : The number of streams for the organization.
GET billing_metrics
Returns
a list of billing_metrics resources. |
Resource Information | |
Rate Limited? |
Yes |
|
session, oauth and org tokens compatible? |
Yes |
|
api_key compatible? |
Yes |
|
Resource URL
http://grovestreams.com/api/billing_metrics
Parameters
startDate | optional | The start datetime (UTC epoch millis) of the range
request. GroveStreams will round to the start of the interval it
falls within. Required if period parameter is "custom". |
endDate | optional | The end datetime (UTC epoch mills) of the range request.
GroveStreams will round to the end of the interval it falls
within.Required if period parameter is "custom". |
detail |
mandatory |
Set to "month" or "hour" |
period |
mandatory |
Set to "current" or
"previous" or "custom". Determines the range of metrics to
return. If "custom" then startDate and endDate parameters are
required. |
Example Requests
/billing_metrics?detail=monthResponse Body
{
"message": "",
"billing_metrics": [
{
"bytesIn": 816,
"startDate":
1293840000000,
"transactions": 816,
"intvlBytesStored": 219000,
"smsNotifications": 10,
"endDate": 1296518400000,
"bytesOut": 1632,
"streamCount": 4
},
{
"bytesIn": 672,
"startDate": 1296518400000,
"transactions": 672,
"intvlBytesStored": 39444,
"smsNotifications": 10,
"endDate": 1298937600000,
"bytesOut": 1344,
"streamCount": 4
}
],
"success":
true
}