Change sendData to queryApi for clearer definition of what function is going