Upgraded parseREST to parse the full path