make use of get_defined_vars() in ApiRequests