We put forward the Axionic String Ansatz (ASA), which provides a unified description for the worldsheet dynamics of confining strings in pure Yang--Mills theory both in D=3 and D=4 space-time dimensions. The ASA is motivated by the excitation spectrum of long confining strings, as measured on a lattice, and by recently constructed integrable axionic non-critical string models. According to the ASA, pure gluodynamics in 3D is described by a non-critical bosonic string theory without any extra local worldsheet degrees of freedom. We argue that this assumption fixes the set of quantum numbers (spins,P- and C-parities) of almost all glueball states. We confront the resulting predictions with the properties of approximately 1 ^ 2 + 2 ^ 2 + 3 ^ 2 + 5 ^ 2 = 39 lightest glueball states measured on a lattice and find a good agreement. On the other hand, the spectrum of low lying glueballs in 4D gluodynamics suggests the presence of a massive pseudoscalar mode on the string worldsheet, in agreement with the ASA and lattice data for long strings.