Be less cavalier about building api endpoint urls