debug api query