adding ajax api