Preheat your oven to 180°C.
Arrange the chicken legs in a large ovenproof dish.
Peel the shallots and cut them in half lengthwise.Arrange them around the chicken legs. Arrange the washed, halved apricots and the garlic cloves around the chicken.
Season generously with salt and pepper, then drizzle with a good amount of olive oil.
Drizzle the chicken with honey diluted in two tablespoons of warm water and arrange the rosemary sprigs in the dish.
Place the dish on the middle rack of the oven and roast for 30 to 40 minutes, basting with the cooking juices every 10 minutes.
Serve with a salad, rice, or couscous.