Bring a large saucepan of water to the boil, add the beans, cover and bring back to the boil, then cook for 3 minutes. Drain and refresh with cold water, then drain again.
Pour the vinegar and sugar into a preserving pan, add the onions and garlic, then cover and bring to the boil. Reduce the heat and simmer for 10 minutes.
Mix the remaining dry ingredients together in a bowl, then mix to a smooth paste with the measurement water. Stir into the vinegar mixture and cook, uncovered, for 5 minutes, stirring until thickened slightly.
Add the blanched vegetables, cook for a further 5 minutes, stirring, until the vegetables are just tender, then ladle into warm, dry jars, pressing the vegetables down below the liquid with a fork and making sure there are no air pockets. Label and leave to mature in a cool, dark place for 3–4 weeks.