api: Added Billing Graphs & Data (#8245)

* Move Billing/Bandwidth Graphs to common format, extract data generation to central function

* Add API functions to access billing graphs and graph data

* Scrutinizer fixes

* Fix transfer graphs with from/to

* Scrutinizer Fix

* Fix docs, transfer page and missing from API param

* Document and fix reducefactor, Add Graph Stats to Graph Data

* Standardise times in graphdata

* Fixed renamed function for History GraphData
This commit is contained in:
Richard Lawley
2018-02-20 14:57:56 +00:00
committed by Neil Lathwood
parent 1c5b9d3524
commit 10829893ec
13 changed files with 920 additions and 530 deletions

View File

@@ -113,7 +113,11 @@ $app->group(
function () use ($app) {
$app->get('/:bill_id', 'authToken', 'list_bills')->name('get_bill');
// api/v0/bills/$bill_id
$app->get('/:bill_id/graphs/:graph_type', 'authToken', 'get_bill_graph')->name('get_bill_graph');
$app->get('/:bill_id/graphdata/:graph_type', 'authToken', 'get_bill_graphdata')->name('get_bill_graphdata');
$app->get('/:bill_id/history', 'authToken', 'get_bill_history')->name('get_bill_history');
$app->get('/:bill_id/history/:bill_hist_id/graphs/:graph_type', 'authToken', 'get_bill_history_graph')->name('get_bill_history_graph');
$app->get('/:bill_id/history/:bill_hist_id/graphdata/:graph_type', 'authToken', 'get_bill_history_graphdata')->name('get_bill_history_graphdata');
}
);
$app->get('/bills', 'authToken', 'list_bills')->name('list_bills');