API access to bills return nothing when using period=previous and a specific bill

When I consult the API address for all bills and use the period=previous I got a response:

https://my.lnms.add/api/v0/bills?period=previous

{
“status”: “ok”,
“bills”: […],
“count”: 20
}

But when I try to get the period=previous for an specific bill, it returns nothing:

https://my.lnms.add/api/v0/bills/1?period=previous

{
“status”: “ok”,
“bills”: ,
“count”: 0
}

The bill id=1 does exist, consult it without the period works fine:

https://argus.tivit.corp/api/v0/bills/1

{
“status”: “ok”,
“bills”: […],
“count”: 1
}

P.S.: Bill list content ommited, not relevant, the count key shows that somithing exists.

Any ideas how to solve the issue?

Thanks.

Found that this seems to be a problem with the API module get_bill for quite some time. There is an issue open on github on Apr 2024 (#15980).

Just for reference I’m using lnms on a docker container and the validate output is:

/opt/librenms$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 25.2.0 (2025-02-23T10:02:21-03:00)
DB Schema | 2025_01_30_000121_add_ifindex_index_to_ports_table (315)
PHP       | 8.3.17
Python    | 3.12.9
Database  | MariaDB 10.5.28-MariaDB-ubu2004
RRDTool   | 1.9.0
SNMP      | 5.9.4
===========================================

[OK]    Installed from package; no Composer required
[OK]    Database connection successful
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service is enabled
[OK]    Locks are functional
[OK]    No python wrapper pollers found
[OK]    Redis is functional
[OK]    rrdtool version ok
[OK]    Connected to rrdcached
[WARN]  Non-git install, updates are manual or from package