Implementation of /recommendToMany REST endpoint

For clarity can pathSegment.getPath() be stored in a variable called uesrID or something and reused?