  We present a Bayesian approach to combine $Planck$ data and the X-ray
physical properties of the intracluster medium in the virialization region of a
sample of 320 galaxy clusters ($0.056<z<1.24$, $kT>3$ keV) observed with
$Chandra$. We exploited the high-level of similarity of the emission measure in
the cluster outskirts as cosmology proxy. The cosmological parameters are thus
constrained assuming that the emission measure profiles at different redshift
are weakly self-similar, that is their shape is universal, explicitly allowing
for temperature and redshift dependence of the gas fraction. This cosmological
test, in combination with $Planck$+SNIa data, allows us to put a tight
constraint on the dark energy models. For a constant-$w$ model, we have
$w=-1.010\pm0.030$ and $\Omega_m=0.311\pm0.014$, while for a time-evolving
equation of state of dark energy $w(z)$ we have $\Omega_m=0.308\pm 0.017$,
$w_0=-0.993\pm0.046$ and $w_a=-0.123\pm0.400$. Constraints on the cosmology are
further improved by adding priors on the gas fraction evolution from
hydrodynamic simulations. Current data favour the cosmological constant with
$w\equiv-1$, with no evidence for dynamic dark energy. We checked that our
method is robust towards different sources of systematics, including background
modelling, outlier measurements, selection effects, inhomogeneities of the gas
distribution and cosmic filaments. We also provided for the first time
constraints on which definition of cluster boundary radius is more tenable,
namely based on a fixed overdensity with respect to the critical density of the
Universe. This novel cosmological test has the capacity to provide a
generational leap forward in our understanding of the equation of state of dark
energy.
