PDIO-230 Refactor checking valid id in URL