Nondeprecated API to get lastReportedAt

Micah_Billman
Conversationalist

Nondeprecated API to get lastReportedAt

I currently use /organizations/{organizationId}/devices/statuses which includes lastReportedAt, however, that API is being deprecated.  I can't find an API that pulls the lastReportedAt (or similar) from all devices.  Is there a suggested API that still gives this response.  

3 Replies 3
alemabrahao
Kind of a big deal
Kind of a big deal

You can try this one organizations/{organizationId}/devices/availabilities/changeHistory

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
John_on_API
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

Hi @Micah_Billman, seconding @alemabrahao's advice above. 

 

Here are some things to keep in mind when working with device availability and the API:

  • Update Frequency: The API (even old versions) only updates device status about once every five minutes. So, checking more often than that won’t give you more accurate information, and is just wasting your API budget.
  • Device Status:
    • If a device is shown as online or alerting (using the devices availabilities or devices availabilities change history APIs), that means it must have checked in within the last five minutes.
    • If a device is marked as offline, it hasn’t checked in since before the last five-minute update.
    • If a device is marked as dormant, it hasn’t checked in for at least two weeks. Once a device is dormant, you can be sure that nothing that happened more recently is to blame for why it went offline. After all, it's been offline for at least two weeks!
  • History Tracking: If you want to know exactly when a device changed status (like when it went offline or dormant), the availabilities change history API gives you a list of timestamps for each change.
  • Efficiency Tip: Instead of constantly checking the last time a device updated, it’s better to use the change history to see when important status changes happened. Polling just for updated timestamps isn’t the best way to track device activity.
Micah_Billman
Conversationalist

Thanks @alemabrahao  and @John_on_API , this is very helpful!  Thanks for the advice!

Get notified when there are additional replies to this discussion.