   constructor: (@robot, @url, @authToken) ->
     @logger = @robot.logger
 
-    @baseUrl = "http://#{@url}/api/11"
+    @baseUrl = "#{@url}/api/12"
 
     @headers =
       "Accept": "application/xml"

#   "xml2js": "^0.4.1"
#
# Commands:
#   hubot rundeck list projects in [environment]                     - Gets a list of the projects for the given server alias
#   hubut rundeck list jobs in [project] in [environment]            - Gets a list of all the jobs in the given project for the given server alias
#   hubot rundeck run [job] in [project] on [environment]            - Triggers the given job for the given project
#   hubot rundeck show status of [job] in [project] on [environment] - Shows the current status for the latest execution of the given job
#   hubot rundeck show aliases                                       - shows the aliases for the list of rundeck instances
#   hubot rundeck add alias [alias name] [url] [authToken]           - sets the alias for a given url and authentication token
#   hubot rundeck clear alias [alias name]                           - removed the given alias

        else
          msg.send "No rundeck projects found."

  #hubot rundeck 'MyProject' jobs myrundeck-alias
  robot.respond /rundeck '(.*)' jobs (.*)/i, (msg) ->
    if msg.message.user.id is robot.name
      return

