Added new API route for billing information #360

Merged
merged 2 commits into from Dec 6, 2014

Projects

None yet

2 participants

@laf
Member
laf commented Dec 2, 2014

Calls:

curl -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27"
"https://librenms.example.com/api/v0/bills"

curl -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27"
"https://librenms.example.com/api/v0/bills/$bill_id"

Output:

{
"status": "ok",
"err-msg": "",
"count": 2,
"bills": [
{
"bill_id": "1",
"bill_name": "Testing",
"bill_type": "cdr",
"bill_cdr": "10001000000000",
"bill_day": "1",
"bill_quota": "0",
"rate_95th_in": "22818",
"rate_95th_out": "56652",
"rate_95th": "56652",
"dir_95th": "out",
"total_data": "926085445",
"total_data_in": "411520932",
"total_data_out": "514564513",
"rate_average_in": "0",
"rate_average_out": "0",
"rate_average": "43366",
"bill_last_calc": "2014-12-02 23:01:03",
"bill_custid": "Testing",
"bill_ref": "testref",
"bill_notes": "",
"bill_autoadded": "0"
},
{
"bill_id": "2",
"bill_name": "W00t",
"bill_type": "cdr",
"bill_cdr": "100000000",
"bill_day": "1",
"bill_quota": "0",
"rate_95th_in": "0",
"rate_95th_out": "0",
"rate_95th": "0",
"dir_95th": "",
"total_data": "0",
"total_data_in": "0",
"total_data_out": "0",
"rate_average_in": "0",
"rate_average_out": "0",
"rate_average": "0",
"bill_last_calc": "0000-00-00 00:00:00",
"bill_custid": "Nowbown",
"bill_ref": "Sadsadas",
"bill_notes": "",
"bill_autoadded": "0"
}
]
}

{
"status": "ok",
"err-msg": "",
"count": 1,
"bills": [
{
"bill_id": "2",
"bill_name": "W00t",
"bill_type": "cdr",
"bill_cdr": "100000000",
"bill_day": "1",
"bill_quota": "0",
"rate_95th_in": "0",
"rate_95th_out": "0",
"rate_95th": "0",
"dir_95th": "",
"total_data": "0",
"total_data_in": "0",
"total_data_out": "0",
"rate_average_in": "0",
"rate_average_out": "0",
"rate_average": "0",
"bill_last_calc": "0000-00-00 00:00:00",
"bill_custid": "Nowbown",
"bill_ref": "Sadsadas",
"bill_notes": "",
"bill_autoadded": "0"
}
]
}

@paulgear paulgear merged commit d9e35ff into librenms:master Dec 6, 2014

1 check passed

ci/scrutinizer Scrutinizer: 3 new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment