Debugging improvements (infrastructure) for REST API