Added function to get workspaces
Edited functions to make compliant with API v8