Best Way to Get Last Device Metrics via API?

Hi ChirpStack community,

I’m trying to retrieve the most recent metrics (temperature, humidity, battery) for a specific device by its EUI via API. While I see time-range endpoints like:
/api/devices/{devEui}/metrics?start=...&end=...

I’m looking for a simpler way to get just the last reported values without calculating time windows.

What I’ve Tried:

  1. /frames endpoint → Returns “Not Found” (code 5)
  2. /metrics without timestamps → “start is None” error (code 13)
  3. Setting arbitrary old start date → Works but feels hacky

Question:
Is there a built-in endpoint to fetch only the most recent metrics? If not, what’s the recommended approach?

Current Workaround:

curl -X GET \  
  "http://server:8090/api/devices/DEV_EUI/metrics?limit=1&start=2020-01-01T00:00:00Z" \  
  -H "Grpc-Metadata-Authorization: Bearer API_KEY"  

I think if you’re using the API you will have to designate a timeframe.

Have you looked into the integrations? Might be a viable alternative there, like an AMQP queue that only stores 6 uplinks or something.