Generate apis and access crud via server events