return json error responses to API calls closes #30, hardcode test server in #29
added support for POST /survey/* endpoints, #4