making generic queries work
added JSON rest API path for generic queries