 (def create-job-command "create_job")
 (def update-job-command "update_job")
 
+; command names used by various REST API responses
+(def commands {
+    :start-job             "start_job"
+    :enable-job            "enable_job"
+    :disable-job           "disable_job"
+    :create-job            "create_job"
+    :delete-job            "delete_job"
+    :update-job            "update_job"})
+
 ; HTTP codes used by several REST API responses
 (def http-codes {
     :ok                    200

                (-> (create-error-response "(not needed)" "reload-all-results" (.getMessage e))
                    (send-error-response request :internal-server-error)))))

(defn job-does-not-exist-response
    [job-name command]
    (create-error-response job-name command "Job does not exist"))

(defn job-already-exist-response
    [job-name command]
    (create-error-response job-name command "Job already exist"))

(defn start-job
    [request]
    (let [job-name (get-job-name-from-body request)]

        {:status "error"
         :command command}))

(defn job-does-not-exist-response
    [job-name command]
    (create-error-response job-name (get commands command) "Job does not exist"))

(defn job-already-exist-response
    [job-name command]
    (create-error-response job-name (get commands command) "Job already exist"))

(defn send-job-does-not-exist-response
    [request job-name command]
    (-> (job-does-not-exist-response job-name command)
        (send-error-response request :not-found)))

(defn send-job-not-specified-response
    [request command]
    (-> (create-bad-request-response command "job name is not specified")
        (send-error-response request :bad-request)))

(defn reload-all-results
    [request]
    (try
