add debug logging for client api rest endpoints