API Call to get current platform state?

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 :slight_smile:

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?

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!