           (get-in (:headers
                    (let [sample (last (sg/generate-examples amon/BaseProject))]
                      (reset! poster-map (assoc-in @poster-map [:project-name] (:name sample)))
-                     (client/post (apply str "http://127.0.0.1:8010" @programme-loc "/projects/") {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"] :body (json/write-str (assoc-in sample [:programme_id]  (clojure.string/replace @programme-loc  #"/4/programmes/(.*?)" "$1")))})))
+                     (client/post (apply str base-addr @programme-loc "/projects/") {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"] :body (json/write-str (assoc-in sample [:programme_id]  (clojure.string/replace @programme-loc  #"/4/programmes/(.*?)" "$1")))})))
                   ["Location"]))
   (log/info "Project: " @project-loc))
 

          (get-in (:headers
                   (let [sample (last (sg/generate-examples amon/BaseProgramme))]
                     (reset! poster-map (assoc-in @poster-map [:programme-name] (:name sample)))
                     (client/post "http://127.0.0.1:8010/4/programmes/" {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"] :body (json/write-str sample)})))
                  ["Location"]))
  (log/info "Programmes: " @programme-loc))



(defn- get-programme []
  (log/info "\nProgramme data:\n")
  (let [output (json/read-json (:body (client/get (apply str base-addr "/4" @programme-loc) {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"]})))
        prog-name (:name output)]
    (reset! getter-map (assoc-in @getter-map [:programme-name] prog-name))
     (log/info output)))

(defn- get-project []
  (log/info "\nProject data:\n")
  (let [output (json/read-json (:body (client/get (apply str base-addr "/4" @programme-loc @project-loc) {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"]})))
        proj-name (:name output)]
    (reset! getter-map (assoc-in @getter-map [:project-name] proj-name))
     (log/info output)))

(defn- get-entity []
  (log/info "\nEntity data:\n")
  (let [output (json/read-json (:body (client/get (apply str base-addr "/4" @entity-loc) {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"]})))
        prop-code (:property_code output)]
    (reset! getter-map (assoc-in @getter-map [:entity-property-code] prop-code))
     (log/info output)))

(defn- get-device []
  (log/info "\nDevice data:\n")
  (let [output (json/read-json (:body (client/get (apply str base-addr "/4" @device-loc) {:accept :json :content-type :json :basic-auth ["support@mastodonc.com" "password"]})))
        device-desc (:description output)]
     (reset! getter-map (assoc-in @getter-map [:device-description] device-desc))
    (log/info output)))
