Heat 2 tbsp olive oil in an ovenproof frying pan. Add the onions and thyme and saute on a low heat for 7–10 minutes, until the onions are soft and slightly caramelised.
Add the diced courgettes and cook over a medium heat for 5 minutes. Using a slotted spoon, lift the onions and courgettes from the pan and discard the remaining oil.
In a bowl, mix together the eggs, parsley, Parmesan, salt and pepper. Gently stir in the onions and courgettes until they are all coated with the egg mixture.
Wipe out the pan with kitchen paper and heat the remaining 2 tbsp oil. Add the egg and courgette mixture to the pan and cook over a very low heat, until the egg begins to set. To prevent the frittata from sticking, use a metal spatula to lift it and allow the uncooked egg to run underneath.
Preheat the grill to a medium heat. Once the frittata has set around the edges but is still unset in the middle, transfer under the grill for about 5 minutes, until the centre is set and golden.
To remove it from the pan, place a plate over the frying pan and invert the pan.
The frittata should just pop onto the plate (take care, as the pan will be very hot).
Cut into wedges and serve garnished with parsley.