# Cloud API diagnostic (last) not in sync

**URL:** <https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467>\
**Category:** Cloud\
**Created:** [November 18, 2020, 7:19am UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467 "2020-11-18T07:19:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mm1987](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mm1987](https://community.particle.io/u/mm1987)\
**Post date:** [November 18, 2020, 7:19am UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/1 "2020-11-18T07:19:15Z")

</div>

Hi everyone,

Thinkering a bit with particle with a friend and have a device sending data to our server via webhooks. We started sending our own diagnostics too but found a lot of those are already on particle’s cloud end, so i thought that i can retrieve those instead.

Problem is that I don’t get why, when i call the API `https://api.particle.io/v1/products/xxxxx/diagnostics/xxxxxxxxx/last` the data is never in sync, even hours later. My device last reported at 5:20AM (this is what I store in my db as creation time as well as the “published\_at” that comes from the particle event) today and the cloud API returns me the latest as 1:20AM (updated\_at).

Can someone tell me why this is? bug? am i looking at timezone difference?

/Manuel

---

<div class="post-metadata">

**Author:** ![marekparticle](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/marekparticle/32/22793_2.png) [@marekparticle](https://community.particle.io/u/marekparticle)\
**Post date:** [November 18, 2020, 1:05pm UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/2 "2020-11-18T13:05:33Z")

</div>

Hi @mm1987 - as far as I understand your question, diagnostics are typically only published from the device automatically under certain conditions (e.g. a handshake, a hard reset, etc…). You will have to ask the device to publish vitals ([https://docs.particle.io/reference/device-os/firmware/argon/#particle-publishvitals-](https://docs.particle.io/reference/device-os/firmware/argon/#particle-publishvitals-)) in order to keep your requests more in sync.

---

<div class="post-metadata">

**Author:** ![armor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/armor/32/18398_2.png) [@armor](https://community.particle.io/u/armor)\
**Post date:** [November 18, 2020, 3:49pm UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/3 "2020-11-18T15:49:51Z")

</div>

Welcome to the community.

The question here is what are you actually trying to do or need to do?  
You can publish the status of your device on a suitably regular basis including all the relevant data that you need. You can also put the actual local date/time on the device in that data so you don’t have to worry if the message gets buffered somewhere.

As an example - the device web app I work with requires a heartbeat/update from each device at least every minute except when they are sleeping. This means the web app can maintain a digital double pretty much in sync with the actual device.

---

<div class="post-metadata">

**Author:** ![mm1987](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mm1987](https://community.particle.io/u/mm1987)\
**Post date:** [November 18, 2020, 9:58pm UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/4 "2020-11-18T21:58:31Z")

</div>

Oh thanks guys! We found out that it’s something we ourselves can/have to push to the cloud. though it was something that happened automatically with any connection the device made.

---

<div class="post-metadata">

**Author:** ![armor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/armor/32/18398_2.png) [@armor](https://community.particle.io/u/armor)\
**Post date:** [November 20, 2020, 12:19pm UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/5 "2020-11-20T12:19:00Z")

</div>

Could you tick this thread as solved?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [May 22, 2021, 12:19am UTC](https://community.particle.io/t/cloud-api-diagnostic-last-not-in-sync/58467/6 "2021-05-22T00:19:00Z")

</div>

Closed on May 22, 2021, 12:19am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
