API unittests, pass optional params to doApiRequest()