Azuki Ruby Client

The Azuki Ruby Client is used to interact with the Azuki API from Ruby.

For more about the Azuki API see

Build Status


Start by creating a connection to Azuki with your credentials:

require 'azuki-api'

azuki = => API_KEY)                           # use API Key
azuki = => USERNAME, :password => PASSWORD)  # use username and password
azuki = => {'User-Agent' => 'custom'})        # use custom header

NOTE: You can leave out the :api_key if ENV['AZUKI_API_KEY'] is set instead.

Now you can make requests to the api.


What follows is an overview of commands you can run for the client.

For additional details about any of the commands, see the API docs.


azuki.delete_addon(APP, ADD_ON)    # remove the ADD_ON add-on from the app named APP
azuki.post_addon(APP, ADD_ON)      # add ADD_ON add-on to an the app named APP
azuki.put_addon(APP, ADD_ON)       # update the ADD_ON add-on on the app named APP
azuki.get_addons                   # see a listing of all available add-ons
azuki.get_addons(APP)              # see listing of installed add-ons for the app named APP


azuki.delete_app(APP)                  # delete the app named APP
azuki.get_apps                         # get a list of your apps
azuki.get_app(APP)                     # get info about the app named APP
azuki.post_app                         # create an app with a generated name and the default stack
azuki.post_app_maintenance(APP, '1')   # toggle maintenance mode for the app named APP
azuki.post_app('name' => 'app')        # create an app with a specified name, APP
azuki.put_app('name' => 'myapp')       # update an app to have a different name


azuki.delete_collaborator(APP, '[email protected]')   # remove '[email protected]' collaborator from APP app
azuki.get_collaborators(APP)                          # list collaborators for APP app
azuki.post_collaborator(APP, '[email protected]')     # add '[email protected]' collaborator to APP app

Config Variables

azuki.delete_config_var(APP, KEY)               # remove KEY key from APP app
azuki.get_config_vars(APP)                      # get list of config vars for APP app
azuki.put_config_vars(APP, KEY => 'value')      # set KEY key to 'value' for APP app


azuki.delete_domain(APP, '')   # remove the '' domain from the APP app
azuki.get_domains(APP)                    # list configured domains for the APP app
azuki.post_domain(APP, '')     # add '' domain to the APP app


azuki.delete_key('[email protected]') # remove the '[email protected]' key
azuki.delete_keys                       # remove all keys
azuki.get_keys                          # list configured keys
azuki.post_key('key data')              # add key defined by 'key data'


azuki.get_logs(APP) # return logs information for APP app


azuki.get_ps(APP)                               # list current processes for APP app
azuki.post_ps(APP, 'command')                   # run 'command' command in context of APP app
azuki.post_ps_restart(APP)                      # restart all processes for APP app
azuki.post_ps_scale(APP, TYPE, QTY)             # scale TYPE type processes to QTY for APP app
azuki.post_ps_stop(APP, 'ps' => 'web.1')        # stop 'web.1' process for APP app
azuki.post_ps_stop(APP, 'type' => 'web')        # stop all 'web' processes for APP app
azuki.post_ps_restart(APP, 'ps' => 'web.1')     # restart 'web.1' process for APP app
azuki.put_dynos(APP, DYNOS)                     # set number of dynos for bamboo app APP to DYNOS
azuki.put_workers(APP, WORKERS)                 # set number of workers for bamboo app APP to WORKERS
azuki.post_ps_scale(APP, 'worker', WORKERS)     # set number of workers for cedar app APP to WORKERS


azuki.get_releases(APP)       # list of releases for the APP app
azuki.get_release(APP, 'v#')  # get details of 'v#' release for APP app
azuki.post_release(APP, 'v#') # rollback APP app to 'v#' release


azuki.get_stack(APP)          # list available stacks
azuki.put_stack(APP, STACK) # migrate APP app to STACK stack


azuki.get_user                  # list user info


For testing (or practice) you can also use a simulated Azuki account:

require 'azuki-api'

azuki = => API_KEY, :mock => true)

Commands will now behave as normal, however, instead of interacting with your actual Azuki account you'll be interacting with a blank test account. Note: test accounts will have NO apps to begin with. You'll need to create one:

azuki.post_app(:name => 'my-test-app')


To run tests, first set ENV['AZUKI_API_KEY'] to your api key. Then use bundle exec rake to run mock tests or MOCK=false bundle exec rake to run integration tests.


Released under the MIT license.