Cachet API Library Wrapper

Travis CI Code Climate Test Coverage Issue Count Inline docs Gem Gem

Ruby library wrapper for


Add this line to your application's Gemfile:

gem 'cachet_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cachet_api


# Under your profile in Cachet, get your api_key from the API Token section. Base url is or

require 'cachet' # have an issue open to fix this, will force v2.0.0

CachetClient =, base_url)
CachetComponents =, base_url)
CachetIncidents =, base_url)
CachetMetrics =, base_url)
CachetSubscribers =, base_url)

View the last release API documentation at:

Library to API Quick Reference

See RubyDoc for more in-depth documentation


Cachet API Ruby Library Options/Params
get/ping N/A


Cachet API Ruby Library Options/Params (R) == Required
get/components CachetComponents.list Options (hash) : id, name, status, group_id, enabled
get/components/:id CachetComponents.list_id Options (hash) : id
post/components CachetComponents.create Options (hash) : name(R), status(R), description, link, order, group_id, enabled
put/components/:id CachetComponents.update Options (hash) : id(R), status(R), name(R), link, order, group_id, enabled
delete/components/:id CachetComponents.delete Options (hash) : id(R)
get/components/groups CachetComponents.groups_list N/A
get/components/groups/:id CachetComponents.groups_list_id Options (hash) : id(R)
post/components/groups CachetComponents.groups_create Options (hash) : name(R), order, collapsed(R)
put/components/groups/:id CachetComponents.groups_update Options (hash) : id(R), name, order, collapsed
delete/components/groups/:id CachetComponents.groups_delete Options (hash) : id(R)


Cachet API Ruby Library Options/Params (R) == Required
get/incidents CachetIncidents.list Options (hash) : id, component_id, name, status, visible
get/incidents/:id CachetIncidents.list_id Options (hash) : id
post/incidents CachetIncidents.create Options (hash) : name(R), message(R), status(R), visible(R), component_id, component_status, notify
put/incidents/:id CachetIncidents.update Options (hash) : id(R), name, message, status, visible, component_id, component_status, notify
delete/incidents/:id CachetIncidents.delete Options (hash) : id


Cachet API Ruby Library Options/Params (R) == Required
get/metrics CachetMetrics.list N/A
post/metrics CachetMetrics.create Options (hash) : name(R), suffix(R), description(R), default_value(R), display_chart(R)
get/metrics/:id CachetMetrics.list_id Options (hash) : id(R)
delete/metrics/:id CachetMetrics.delete Options (hash) : id(R)
get/metrics/:id/points CachetMetrics.point_list Options (hash) : id (R)
post/metrics/:id/points CachetMetrics.point_add Options (hash) : id(R), value(R), timestamp
delete/metrics/:id/points/:point_id CachetMetrics.point_delete Options (hash) : id(R), point_id(R)


Cachet API Ruby Library Options/Params (R) == Required
get/subscribers CachetSubscribers.list N/A
post/subscribers CachetSubscribers.create Options (hash) : email(R), verify
delete/subscribers/:id CachetSubscribers.delete Options (hash) : id(R)


After checking out the repo

  • Run bin/setup
  • To run IRB with quick configuration, rake console
  • To install this gem onto your local machine, run bundle exec rake install


Fork this repo

  • Make your changes
  • Create/Update RSPEC Tests
  • Document changes inline (if needed, aka new options)
  • Document readme with changes
  • Submit pull request