Heat the oil in a pan, fry the finely chopped onion. Add the coarsely grated vegetables and roast them well until they are almost done.
Cut the ham into fine cubes and add. Season with garlic, salt, pepper and thyme. Take the pan off the heat and let it cool down a little.
Whisk the sour cream with the eggs and parmesan well. Mix into the vegetables together with the grated cheese. Scatter the flour on top and mix well. Season to taste again if necessary.
When the mixture has cooled down, spread it on the rolled out puff pastry. Fold in the ends and roll them into a swirl. Place in a greased dish. Bake in the preheated oven at 200 ° C on the middle rack for about 20 - 30 minutes until golden brown.