api is not generating urls anymore

api can be used no matter when a url of JSON information changes)
generate api urls in the gui elements, load task state
moved getPortContentAsText to ports.js
added function to send an JS object directly