Api returns empty list

Hello,

I encountered problem after migrating database. API is working correctly except when I want to get all devices with https://librenms.org/api/v0/devices.
obraz

Thanks for any advice