H5p SPA (react or vue)


Is it possible to fetch questions and content type from API or json and load corresponsing H5p files ? 

eg : API sends question type(true or false)and question with answers. and based on type I need to import true or false library and run the content. I could achieve half way through h5p cli in local. But not sure if the same can be possible in production server. 


Please help !