Ruby SDK for the Comet Server API

@CometBackup on Twitter Gem Version MIT License

The Comet Server API allows you to create and manage customer accounts on your Comet Server.

Comet Licensing Ltd makes this library freely available under the MIT license; you may embed it in any Ruby project, either free or commercial, as long as the copyright header comment remains intact in the *.rb files.


  • Full coverage of Comet Server API methods, data structures, and constant definitions

Version compatibility

This library uses Semantic Versioning. However, large parts of this library are autogenerated from internal protocol descriptions from a specific version of Comet Server; to find the source Comet Server version, check the Comet::APPLICATION_VERSION constant.

Newer API libraries can be safely used with older versions of Comet Server, however some features may be unavailable, and any new API properties will be unrecognized and ignored by the Comet Server.

Older API libraries can be safely used with newer versions of Comet Server. Unknown API properties corresponding to new Comet Server features will be preserved via the @unknown_json_fields system.

Getting Started

This package is provided as a Gem hosted on

Install using Bundler:

echo "gem 'comet_backup_ruby_sdk'" >> Gemfile

Or install using Gem:

gem install comet_backup_ruby_sdk

To compile the Gem from source:

git clone
cd comet-ruby-sdk
gem build comet_backup_ruby_sdk.gemspec


Connect to the Comet Server and iterate through user profiles:

require 'comet_backup_ruby_sdk'

client ="", "admin", "admin")

client.admin_list_users_full.each do |username, profile|
  puts "#{username} has #{profile.destinations.length} Storage Vault(s)"

Error handling

The Comet Server API always returns an HTTP 200 status code, and puts application-level errors in the response message body using the Comet::CometAPIResponseMessage structure. This helps to distinguish between network-level errors and proxy-level errors. This SDK converts application-level errors to raise exceptions:


rescue Comet::APIResponseError => err
  if err.detail.status >= 400 && err.detail.status < 500
    puts "Comet Server returned caller-side error (4xx) - permanent, do not retry"
    puts "Comet Server returned server-side error (5xx) - may want to retry"

rescue StandardError
  puts "Failed to reach the Comet Server (non-200 HTTP status code) - may want to retry"

Running SDK test suite

# safe formatting/fixing and linting
bundle exec rake rubocop -a

    bundle exec rake test

Getting Help

Bug reports and pull requests are welcome on GitHub at

You may also submit issues via the ticket system at