Wonkiness in the way redirects are setup by DTS. Have to pass a machine name as an argument as a workaround. They redirect all non-ssl connections to the rest endpoint but don't allow ssl token connections from the site (darcgis.water.ca.gov)