Added invokeAPI for all sorts of APIs