Added optional path parameter to query, to support /browse and others