                        (parse-uuid))]
        (jq/catalog log-subscriber job-id)))
 
+   ^{:doc "Given a job id, returns flow conditions for this job."}
    {:uri "/job/flow-conditions"
     :request-method :get}
    (fn [request log-subscriber replica]

  (UUID/fromString x))

(def endpoints
  {{:uri "/replica/peers"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/peers replica))

   {:uri "/replica/jobs"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/jobs replica))

   {:uri "/replica/killed-jobs"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/killed-jobs replica))

   {:uri "/replica/completed-jobs"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/completed-jobs replica))

   {:uri "/replica/tasks"
    :request-method :get}
   (fn [request log-subscriber replica]
     (let [job-id (get-in request [:query-params "job-id"])]
       (rq/tasks replica (parse-uuid job-id))))

   {:uri "/replica/job-allocation"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/job-allocations replica))

   {:uri "/replica/task-allocation"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/task-allocations replica))

   {:uri "/replica/peer-site"
    :request-method :get}
   (fn [request log-subscriber replica]
     (let [peer-id (get-in request [:query-params "peer-id"])]
       (rq/peer-site replica (parse-uuid peer-id))))

   {:uri "/replica/peer-state"
    :request-method :get}
   (fn [request log-subscriber replica]
     (let [peer-id (get-in request [:query-params "peer-id"])]
       (rq/peer-state replica (parse-uuid peer-id))))

   {:uri "/replica/peer-allocation"
    :request-method :get}
   (fn [request log-subscriber replica]
     (let [peer-id (get-in request [:query-params "peer-id"])]
       (rq/peer-allocation replica (parse-uuid peer-id))))

   {:uri "/replica/job-scheduler"
    :request-method :get}
   (fn [request log-subscriber replica]
     (rq/job-scheduler replica))

   {:uri "/replica/task-scheduler"
    :request-method :get}
   (fn [request log-subscriber replica]
     (let [job-id (get-in request [:query-params "job-id"])]
       (rq/task-scheduler replica (parse-uuid job-id))))

   {:uri "/job/workflow"
    :request-method :get}
   (fn [request log-subscriber replica]

                       (parse-uuid))]
       (jq/flow-conditions log-subscriber job-id)))

   ^{:doc "Given a job id, returns lifecycles for this job."}
   {:uri "/job/lifecycles"
    :request-method :get}
   (fn [request log-subscriber replica]
