   constructor: (@robot) ->
     @logger = @robot.logger
 
-    @baseUrl = process.env.HUBOT_RUNDECK_URL
+    @baseUrl = "#{process.env.HUBOT_RUNDECK_URL}/api/12"
     @authToken = process.env.HUBOT_RUNDECK_TOKEN
     @project = process.env.HUBOT_RUNDECK_PROJECT
     @adminRole = "rundeck_admin"

#   "hubot-auth"
#
# Configuration:
#   HUBOT_RUNDECK_URL
#   HUBOT_RUNDECK_TOKEN
#   HUBOT_RUNDECK_PROJECT
#

      rundeck.jobs().run name, null, (job, results) ->
        if job
          robot.logger.debug inspect(results, false, null)
          msg.send "Running job #{name}: #{results.executions.execution[0]['$'].href}"
        else
          msg.send "Could not execute Rundeck job \"#{name}\"."
    else
