Inverse problems in Darboux' theory of integrability