Valid yaml example for training via rest api

As i see it is not possible to send yaml training data as json to the rasa rest api. It will handle the training data in the request as markdown. So it is not possible to migrate all training data to yaml when u use the rest api and send over as json. It is possible to send the training data as yaml string but there is no documentation how the string must be look like. The code tells me:

dict(
        domain=str(training_data),
        config=str(training_data),
        training_files=str(temp_dir),
        output=model_output_directory,
        force_training=request.args.get("force_training", False),
    )

but what is this training_files exactly?

It is possible, but the documentation is not clear. See these issues:

Try this:

curl --request POST \
  --url http://localhost:5005/model/train \
  --header 'Content-Type: application/x-yaml' \
  --data '---
intents:
  - greet
language: en
nlu:
  - examples: |
        - hi
        - hello
    intent: greet
  - examples: |
        - goodbye
        - bye
    intent: bye
pipeline:
  - name: WhitespaceTokenizer
  - name: CountVectorsFeaturizer
  - name: DucklingHTTPExtractor
  - epochs: 1
    name: DIETClassifier
policies:
  - name: RulePolicy
responses:
  utter_greet:
    - text: Hi
rules:
  - rule: "My rule"
    steps:
      - intent: greet
      - action: utter_greet
stories:
  - steps:
      - intent: greet
      - action: utter_greet
    story: "My story"
'