Training Rasa On Fly

What should be a good approach in training rasa from new training data on fly. Using train api endpoint.

I will collect training data from database.

what should be the training data format from what i saw in example it’s the same as nlu.yaml file.