# API Call to get current platform state?

**URL:** <https://hub.mender.io/t/api-call-to-get-current-platform-state/695>\
**Category:** General Discussions\
**Created:** [June 12, 2019, 6:28am UTC](https://hub.mender.io/t/api-call-to-get-current-platform-state/695 "2019-06-12T06:28:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MBConsultingUK](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mbconsultinguk/32/243_2.png) [@MBConsultingUK](https://hub.mender.io/u/MBConsultingUK)\
**Post date:** [June 12, 2019, 6:28am UTC](https://hub.mender.io/t/api-call-to-get-current-platform-state/695/1 "2019-06-12T06:28:46Z")

</div>

Hi folks,

Before I go off and write some custom code that iterates over various endpoints and pulls together how many devices/deploys/artifacts I’ve got on the platform, is there a `/healthcheck` or similar API endpoint that will return this data for me?

I’ve got CI/CD up and running for Mender now, with images being automatically created, uploaded, and deployed as part of the pipeline, so now I’m looking at how I can bring information about Mender into the our monitoring/observation solution.

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [June 12, 2019, 8:15am UTC](https://hub.mender.io/t/api-call-to-get-current-platform-state/695/2 "2019-06-12T08:15:35Z")

</div>

Hi,

I am not aware of any such call (`/healthcheck`), so you probably need to iterate over a various endpoints.

Would be interesting to know what kind of information you would expect from such an endpoint? Is this a common practice to provide?

---

<div class="post-metadata">

**Author:** ![MBConsultingUK](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mbconsultinguk/32/243_2.png) [@MBConsultingUK](https://hub.mender.io/u/MBConsultingUK)\
**Post date:** [June 12, 2019, 11:22am UTC](https://hub.mender.io/t/api-call-to-get-current-platform-state/695/3 "2019-06-12T11:22:23Z")

</div>

ok, thanks.

I’m starting to see this more and more in the “microservices” implementations that our clients are developing.

The idea is that a simple call to `mender.mydomain/health` or similar would return the state of the various services (API/GUI/s3 emulator/docker/etc), with `mender.mydomain/stats` or similar returning the number of devices attached, the number of deploys in progress, the number of successful deploys vs failed ones, that kind of thing.

I’ll iterate over the end-points for now, but it’s potentially something I’d be interested in looking at in future when I’m not quite so time-constrained!
