Assess API version with Spring Boot Actuator

Production-ready endpoints are key to observability. Most java developers are aware of Spring Boot actuator, but if you aren’t, don’t’ worry! Here’s a great write up on the subject. Also, official documentation from Spring‘s is worth a read to understand.

And unless you have a well-planned API versioning by following URL versioning or Accept-Header versioning (interesting list of resources to decide on best approach here), you can easily tell whether an endpoint is serving the intended set of changes by leveraging source-control data, exposed conveniently by actuator endpoint.

I’ve just pushed to GitHub a minimal tool called api-version that uses curl, jq, and the Spring Boot Actuator to give you the exact commit message and id to contrast against your git repo. You’ll be able to assess whether the expected changes are deployed to an instance in seconds.

Please leave your comments here, or feel free to report any issues to the GitHub repo as well.


Spring Boot Actuator:

Official Spring Boot Actuator example:

Discussion on API versioning strategies:

API Versioning tool: