API Improvements — Librato Blog

API Improvements



We're happy to announce a few changes to improve and simplify our API:

One /metrics to rule them all

All operations for all metric types are now available via the metrics route operations. This change should allow you to remove a lot of conditional logic by metric type and will allow us to easily expand into our future metric types without significant changes to the API. If you've been using the gauges or counters routes, these are now deprecated and will be removed in a future version.

.json extensions are now optional (and discouraged)

Our initial cut at the api required .json file extensions for many operations. These have all been removed in favor of HTTP Content Negotiation (see headers on relevant docs). For example:

/v1/metrics.json → /v1/metrics

If you have existing code which uses these extensions it should continue to work, but you may want to remove it to ensure the greatest compatibility in the future.

Upgrading for the goodness

Current versions of the librato-metrics gem and our statsd fork already incorporate these changes as well as other improvements, so upgrade to the latest as is convenient.

Onward!

Our goal is to maintain backwards compatibility as best we can throughout the v1 lifecycle of our API. We have a bunch more improvements on the way which we'll be discussing in the next few weeks.

Start using Librato now. Full-featured and free for 30 days. Pricing starts at $5 per month.
I accept the Terms of Service, Privacy Policy and occasional emails from Librato. Got questions? Talk to us.