USAGE METERING & INTELLIGENCE
Usage Data
Querying Usage
2 min
query usage data docid\ arr7x fdequk7pukn3vu usage api payload post https //app amberflo io/usage java usage { // replace business unit id with customerid for a billing use case "meterapiname" "apicalls", "aggregation" "sum", "timegroupinginterval" "day", "timerange" { "starttimeinseconds" 1619293642 }, "filter" { "business unit id" \["xxx", "yyy"]}, "groupby" \["business unit id"], "take" { "limit" 10, "isascending" false } } api response breakdown sample api response usage response { // replace business unit id with customerid for a billing use case "metadata" { "account" null, "meterapiname" "apicalls", "aggregation" "sum", "timerange" { "starttimeinseconds" 1619294851, "endtimeinseconds" 1619467650 }, "filter" { "business unit id" \[ "xxx", "yyy" ] }, "groupby" \[ "customerid" ], "take" { "limit" 10, "isascending" false }, "timegroupinginterval" "day" }, "secondssinceepochintervals" \[ 1619222400, 1619308800, 1619395200 ], "clientmeters" \[ { "group" { "groupinfo" { "business unit id" "xxx" } }, "groupvalue" 23645 0, "values" \[ { "percentagefromprevious" 0 0, "value" 0 0, "secondssinceepochutc" 1619222400 }, { "percentagefromprevious" 100 0, "value" 4040 0, "secondssinceepochutc" 1619308800 }, { "percentagefromprevious" 385 2722772277228, "value" 19605 0, "secondssinceepochutc" 1619395200 } ] }, { "group" { "groupinfo" { "business unit id" "yyy" } }, "groupvalue" 22608 0, "values" \[ { "percentagefromprevious" 0 0, "value" 0 0, "secondssinceepochutc" 1619222400 }, { "percentagefromprevious" 100 0, "value" 2507 0, "secondssinceepochutc" 1619308800 }, { "percentagefromprevious" 701 7949740725967, "value" 20101 0, "secondssinceepochutc" 1619395200 } ] } ] }
