added returns to api.js
added initWorkspace to workspaceFunctions

initWorkspace asks for the information in the field workspaceCode of
the session