diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
index 1d37baf..34086e7 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterApiServlet.java
@@ -42,7 +42,6 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import io.netty.handler.codec.http.HttpHeaderNames;
-import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpResponseStatus;
 
 public class ClusterApiServlet extends AbstractServlet {
@@ -72,7 +71,7 @@
         try {
             ObjectNode json;
             response.setStatus(HttpResponseStatus.OK);
-            switch (path(request)) {
+            switch (localPath(request)) {
                 case "":
                     json = getClusterStateJSON(request, "");
                     break;
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
index 776f884..d680e6e 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ClusterControllerDetailsApiServlet.java
@@ -52,7 +52,7 @@
         try {
             ObjectNode json;
             response.setStatus(HttpResponseStatus.OK);
-            if ("".equals(path(request))) {
+            if ("".equals(localPath(request))) {
                 json = (ObjectNode) getClusterStateJSON(request, "../").get("cc");
             } else {
                 json = processNode(request, hcc);
@@ -70,13 +70,13 @@
     }
 
     private ObjectNode processNode(IServletRequest request, IHyracksClientConnection hcc) throws Exception {
-        String pathInfo = path(request);
-        if (pathInfo.endsWith("/")) {
+        String localPath = localPath(request);
+        if (localPath.endsWith("/")) {
             throw new IllegalArgumentException();
         }
-        String[] parts = pathInfo.substring(1).split("/");
+        String[] parts = localPath.substring(1).split("/");
 
-        if ("".equals(pathInfo)) {
+        if ("".equals(localPath)) {
             return (ObjectNode) getClusterStateJSON(request, "../../").get("cc");
         } else if (parts.length == 1) {
             switch (parts[0]) {
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
index 366007d..ffe62b4 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/DiagnosticsApiServlet.java
@@ -63,7 +63,7 @@
         response.setStatus(HttpResponseStatus.OK);
         om.enable(SerializationFeature.INDENT_OUTPUT);
         try {
-            if (!"".equals(path(request))) {
+            if (!"".equals(localPath(request))) {
                 throw new IllegalArgumentException();
             }
             json = getClusterDiagnosticsJSON();
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
index ca0888b..07e70ab 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NodeControllerDetailsApiServlet.java
@@ -60,7 +60,7 @@
         try {
             ObjectNode json;
             response.setStatus(HttpResponseStatus.OK);
-            if ("".equals(path(request))) {
+            if ("".equals(localPath(request))) {
                 json = om.createObjectNode();
                 json.set("ncs", getClusterStateJSON(request, "../").get("ncs"));
             } else {
@@ -81,11 +81,11 @@
     }
 
     private ObjectNode processNode(IServletRequest request, IHyracksClientConnection hcc) throws Exception {
-        String pathInfo = path(request);
-        if (pathInfo.endsWith("/")) {
+        String localPath = localPath(request);
+        if (localPath.endsWith("/")) {
             throw new IllegalArgumentException();
         }
-        String[] parts = pathInfo.substring(1).split("/");
+        String[] parts = localPath.substring(1).split("/");
         final String node = parts[0];
 
         if (parts.length == 1) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
index 991649a..9745091 100755
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
@@ -54,11 +54,11 @@
 
     @Override
     public void handle(IServletRequest request, IServletResponse response) {
-        String path = path(request);
-        while (path.startsWith("/")) {
-            path = path.substring(1);
+        String localPath = localPath(request);
+        while (localPath.startsWith("/")) {
+            localPath = localPath.substring(1);
         }
-        final String[] params = path.split("&");
+        final String[] params = localPath.split("&");
         if (params.length != 2 || params[0].isEmpty() || params[1].isEmpty()) {
             response.setStatus(HttpResponseStatus.BAD_REQUEST);
             return;
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
index ebd055d..6acc18a 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/JobsRESTAPIFunction.java
@@ -18,17 +18,25 @@
  */
 package org.apache.hyracks.control.cc.web;
 
+import java.net.URI;
+import java.net.URISyntaxException;
+
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.web.util.IJSONOutputFunction;
+import org.apache.hyracks.control.cc.web.util.JSONOutputRequestUtil;
 import org.apache.hyracks.control.cc.work.GetActivityClusterGraphJSONWork;
 import org.apache.hyracks.control.cc.work.GetJobRunJSONWork;
 import org.apache.hyracks.control.cc.work.GetJobSummariesJSONWork;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class JobsRESTAPIFunction implements IJSONOutputFunction {
+
+    private static final String[] DETAILS = new String[] { "job-run", "job-activity-graph" };
+
     private ClusterControllerService ccs;
 
     public JobsRESTAPIFunction(ClusterControllerService ccs) {
@@ -36,7 +44,7 @@
     }
 
     @Override
-    public ObjectNode invoke(String[] arguments) throws Exception {
+    public ObjectNode invoke(String host, String servletPath, String[] arguments) throws Exception {
         ObjectMapper om = new ObjectMapper();
         ObjectNode result = om.createObjectNode();
         switch (arguments.length) {
@@ -47,7 +55,7 @@
             case 0: {
                 GetJobSummariesJSONWork gjse = new GetJobSummariesJSONWork(ccs.getJobManager());
                 ccs.getWorkQueue().scheduleAndSync(gjse);
-                result.set("result", gjse.getSummaries());
+                result.set("result", enhanceSummaries(gjse.getSummaries(), host, servletPath));
                 break;
             }
 
@@ -69,4 +77,17 @@
         }
         return result;
     }
+
+    private static ArrayNode enhanceSummaries(final ArrayNode summaries, String host, String servletPath)
+            throws URISyntaxException {
+        for (int i = 0; i < summaries.size(); ++i) {
+            ObjectNode node = (ObjectNode) summaries.get(i);
+            final String jid = node.get("job-id").asText();
+            for (String field : DETAILS) {
+                URI uri = JSONOutputRequestUtil.uri(host, servletPath, jid + "/" + field);
+                node.put(field, uri.toString());
+            }
+        }
+        return summaries;
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
index 3b4918c..5c4ae5b 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/NodesRESTAPIFunction.java
@@ -18,12 +18,17 @@
  */
 package org.apache.hyracks.control.cc.web;
 
+import java.net.URI;
+import java.net.URISyntaxException;
+
 import org.apache.hyracks.control.cc.ClusterControllerService;
 import org.apache.hyracks.control.cc.web.util.IJSONOutputFunction;
+import org.apache.hyracks.control.cc.web.util.JSONOutputRequestUtil;
 import org.apache.hyracks.control.cc.work.GetNodeDetailsJSONWork;
 import org.apache.hyracks.control.cc.work.GetNodeSummariesJSONWork;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class NodesRESTAPIFunction implements IJSONOutputFunction {
@@ -34,7 +39,7 @@
     }
 
     @Override
-    public ObjectNode invoke(String[] arguments) throws Exception {
+    public ObjectNode invoke(String host, String servletPath, String[] arguments) throws Exception {
         ObjectMapper om = new ObjectMapper();
         ObjectNode result = om.createObjectNode();
         switch (arguments.length) {
@@ -42,11 +47,11 @@
                 if ("".equals(arguments[0])) {
                     GetNodeSummariesJSONWork gnse = new GetNodeSummariesJSONWork(ccs.getNodeManager());
                     ccs.getWorkQueue().scheduleAndSync(gnse);
-                    result.set("result", gnse.getSummaries());
+                    result.set("result", enhanceSummaries(gnse.getSummaries(), host, servletPath));
                 } else {
                     String nodeId = arguments[0];
-                    GetNodeDetailsJSONWork gnde = new GetNodeDetailsJSONWork(ccs.getNodeManager(), ccs.getCCConfig(),
-                            nodeId, true, true);
+                    GetNodeDetailsJSONWork gnde =
+                            new GetNodeDetailsJSONWork(ccs.getNodeManager(), ccs.getCCConfig(), nodeId, true, true);
                     ccs.getWorkQueue().scheduleAndSync(gnde);
                     result.set("result", gnde.getDetail());
                 }
@@ -54,4 +59,14 @@
         }
         return result;
     }
+
+    private static ArrayNode enhanceSummaries(final ArrayNode summaries, String host, String servletPath)
+            throws URISyntaxException {
+        for (int i = 0; i < summaries.size(); ++i) {
+            ObjectNode node = (ObjectNode) summaries.get(i);
+            URI detailsUri = JSONOutputRequestUtil.uri(host, servletPath, node.get("node-id").asText());
+            node.put("details", detailsUri.toString());
+        }
+        return summaries;
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
index 0657f59..ee22768 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/StateDumpRESTAPIFunction.java
@@ -36,7 +36,7 @@
     }
 
     @Override
-    public ObjectNode invoke(String[] arguments) throws Exception {
+    public ObjectNode invoke(String host, String servletPath, String[] arguments) throws Exception {
         GatherStateDumpsWork gsdw = new GatherStateDumpsWork(ccs);
         ccs.getWorkQueue().scheduleAndSync(gsdw);
         StateDumpRun sdr = gsdw.getStateDumpRun();
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
index ab0a581..580bd06 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/IJSONOutputFunction.java
@@ -21,5 +21,5 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public interface IJSONOutputFunction {
-    public ObjectNode invoke(String[] arguments) throws Exception;
+    ObjectNode invoke(String host, String servletPath, String[] arguments) throws Exception;
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
index 25ceaff..b39915f 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestHandler.java
@@ -31,7 +31,6 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
-import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpResponseStatus;
 
 public class JSONOutputRequestHandler extends AbstractServlet {
@@ -46,20 +45,23 @@
 
     @Override
     protected void get(IServletRequest request, IServletResponse response) {
-        String path = path(request);
-        while (path.startsWith("/")) {
-            path = path.substring(1);
+        String localPath = localPath(request);
+        String servletPath = servletPath(request);
+        String host = host(request);
+        while (localPath.startsWith("/")) {
+            localPath = localPath.substring(1);
         }
-        String[] parts = path.split("/");
-        ObjectNode result = invoke(response, parts);
+        String[] parts = localPath.split("/");
+
+        ObjectNode result = invoke(response, host, servletPath, parts);
         if (result != null) {
             deliver(response, result);
         }
     }
 
-    protected ObjectNode invoke(IServletResponse response, String[] parts) {
+    protected ObjectNode invoke(IServletResponse response, String host, String servletPath, String[] parts) {
         try {
-            return fn.invoke(parts);
+            return fn.invoke(host, servletPath, parts);
         } catch (Exception e) {
             LOGGER.log(Level.WARNING, "Exception invoking " + fn.getClass().getName(), e);
             response.setStatus(HttpResponseStatus.BAD_REQUEST);
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestUtil.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestUtil.java
new file mode 100644
index 0000000..69f0571
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/JSONOutputRequestUtil.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.control.cc.web.util;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class JSONOutputRequestUtil {
+
+    private JSONOutputRequestUtil() {}
+
+    public static URI uri(String host, String prefix, String path) throws URISyntaxException {
+        String name = host;
+        int port = 80;
+        int index = host.indexOf(':');
+        if (index > 0) {
+            String[] split = host.split(":");
+            name = split[0];
+            port = Integer.valueOf(split[1]);
+        }
+        return new URI("http", null, name, port, prefix + "/" + path, null, null);
+    }
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/JobStatusAPIIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/JobStatusAPIIntegrationTest.java
index dbc6151..f2f8061 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/JobStatusAPIIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/JobStatusAPIIntegrationTest.java
@@ -21,6 +21,7 @@
 import static org.apache.hyracks.tests.integration.TestUtil.httpGetAsObject;
 
 import java.io.IOException;
+import java.net.URI;
 import java.net.URISyntaxException;
 
 import org.apache.hyracks.api.constraints.PartitionConstraintHelper;
@@ -118,26 +119,35 @@
         return res;
     }
 
-    private String getJobStatus(JobId jid) throws IOException, URISyntaxException {
+    private ObjectNode getJobSummary(JobId jId) throws IOException, URISyntaxException {
         ArrayNode jobArray = getJobs();
         for (JsonNode n : jobArray) {
             ObjectNode o = (ObjectNode) n;
-            if (JobId.parse(o.get("job-id").asText()).equals(jid)) {
-                return o.get("status").asText();
+            if (JobId.parse(o.get("job-id").asText()).equals(jId)) {
+                return o;
             }
         }
         return null;
     }
 
+    private String getJobStatus(JobId jId) throws IOException, URISyntaxException {
+        ObjectNode o = getJobSummary(jId);
+        return o != null ? o.get("status").asText() : null;
+    }
+
     protected ArrayNode getJobs() throws URISyntaxException, IOException {
         return ((ArrayNode) httpGetAsObject(ROOT_PATH).get("result"));
     }
 
     protected ObjectNode getJobActivityGraph(JobId jId) throws URISyntaxException, IOException {
-        return httpGetAsObject(ROOT_PATH + "/" + jId.toString() + "/job-activity-graph");
+        ObjectNode o = getJobSummary(jId);
+        URI uri = new URI(o.get("job-activity-graph").asText());
+        return httpGetAsObject(uri);
     }
 
     protected ObjectNode getJobRun(JobId jId) throws URISyntaxException, IOException {
-        return httpGetAsObject(ROOT_PATH + "/" + jId.toString() + "/job-run");
+        ObjectNode o = getJobSummary(jId);
+        URI uri = new URI(o.get("job-run").asText());
+        return httpGetAsObject(uri);
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/NodesAPIIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/NodesAPIIntegrationTest.java
index ead70b1..6f05600 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/NodesAPIIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/NodesAPIIntegrationTest.java
@@ -22,6 +22,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.List;
@@ -29,12 +30,13 @@
 import org.junit.Assert;
 import org.junit.Test;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class NodesAPIIntegrationTest extends AbstractIntegrationTest {
 
-    static final String[] NODE_SUMMARY_FIELDS = { "node-id", "heap-used", "system-load-average" };
+    static final String[] NODE_SUMMARY_FIELDS = { "node-id", "heap-used", "system-load-average", "details" };
 
     static final String[] NODE_DETAILS_FIELDS = { "node-id", "os-name", "arch", "os-version", "num-processors",
             "vm-name", "vm-version", "vm-vendor", "classpath", "library-path", "boot-classpath", "input-arguments",
@@ -52,9 +54,7 @@
 
     @Test
     public void testNodeSummaries() throws Exception {
-        ObjectNode res = httpGetAsObject(ROOT_PATH);
-        Assert.assertTrue(res.has("result"));
-        ArrayNode nodes = (ArrayNode) res.get("result");
+        ArrayNode nodes = getNodeSummaries();
         final int size = nodes.size();
         Assert.assertEquals(2, size);
         for (int i = 0; i < size; ++i) {
@@ -62,11 +62,19 @@
         }
     }
 
+    protected ArrayNode getNodeSummaries() throws URISyntaxException, IOException {
+        ObjectNode res = httpGetAsObject(ROOT_PATH);
+        Assert.assertTrue(res.has("result"));
+        return (ArrayNode) res.get("result");
+    }
+
     @Test
     public void testNodeDetails() throws Exception {
-        List<String> nodeIds = getNodeIds();
-        for (String nodeId : nodeIds) {
-            ObjectNode res = httpGetAsObject(ROOT_PATH + "/" + nodeId);
+        ArrayNode nodes = getNodeSummaries();
+        for (JsonNode n : nodes) {
+            ObjectNode o = (ObjectNode) n;
+            URI uri = new URI(o.get("details").asText());
+            ObjectNode res = httpGetAsObject(uri);
             checkNodeFields((ObjectNode) res.get("result"), NODE_DETAILS_FIELDS);
         }
     }
@@ -93,9 +101,7 @@
     }
 
     private List<String> getNodeIds() throws IOException, URISyntaxException {
-        ObjectNode res = httpGetAsObject(ROOT_PATH);
-        Assert.assertTrue(res.has("result"));
-        ArrayNode nodes = (ArrayNode) res.get("result");
+        ArrayNode nodes = getNodeSummaries();
         final int size = nodes.size();
         List<String> nodeIds = new ArrayList<>();
         for (int i = 0; i < size; ++i) {
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestUtil.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestUtil.java
index a855d53..d53a04c 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestUtil.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestUtil.java
@@ -42,14 +42,18 @@
         return new URI("http", null, HOST, PORT, path, null, null);
     }
 
-    static InputStream httpGetAsInputStream(String path) throws URISyntaxException, IOException {
+    static InputStream httpGetAsInputStream(URI uri) throws URISyntaxException, IOException {
         HttpClient client = HttpClients.createMinimal();
-        HttpResponse response = client.execute(new HttpGet(uri(path)));
+        HttpResponse response = client.execute(new HttpGet(uri));
         return response.getEntity().getContent();
     }
 
     static String httpGetAsString(String path) throws URISyntaxException, IOException {
-        InputStream resultStream = httpGetAsInputStream(path);
+        return httpGetAsString(uri(path));
+    }
+
+    static String httpGetAsString(URI uri) throws URISyntaxException, IOException {
+        InputStream resultStream = httpGetAsInputStream(uri);
         return IOUtils.toString(resultStream, Charset.defaultCharset());
     }
 
@@ -60,4 +64,8 @@
     static ObjectNode httpGetAsObject(String path) throws URISyntaxException, IOException {
         return getResultAsJson(httpGetAsString(path));
     }
+
+    static ObjectNode httpGetAsObject(URI uri) throws URISyntaxException, IOException {
+        return getResultAsJson(httpGetAsString(uri));
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
index 37ef3bb..cb9deea 100644
--- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
+++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/AbstractServlet.java
@@ -27,6 +27,7 @@
 import org.apache.hyracks.http.api.IServletRequest;
 import org.apache.hyracks.http.api.IServletResponse;
 
+import io.netty.handler.codec.http.HttpHeaderNames;
 import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpResponseStatus;
 
@@ -124,12 +125,26 @@
         response.setStatus(HttpResponseStatus.METHOD_NOT_ALLOWED);
     }
 
-    public String path(IServletRequest request) {
+    public String host(IServletRequest request) {
+        return request.getHttpRequest().headers().get(HttpHeaderNames.HOST);
+    }
+
+    public String localPath(IServletRequest request) {
+        final String uri = request.getHttpRequest().uri();
+        return uri.substring(trim(uri));
+    }
+
+    public String servletPath(IServletRequest request) {
+        final String uri = request.getHttpRequest().uri();
+        return uri.substring(0, trim(uri));
+    }
+
+    protected int trim(final String uri) {
         int trim = -1;
         if (paths.length > 1) {
             for (int i = 0; i < paths.length; i++) {
                 String path = paths[i].indexOf('*') >= 0 ? paths[i].substring(0, paths[i].indexOf('*')) : paths[0];
-                if (request.getHttpRequest().uri().indexOf(path) == 0) {
+                if (uri.indexOf(path) == 0) {
                     trim = trims[i];
                     break;
                 }
@@ -137,7 +152,7 @@
         } else {
             trim = trims[0];
         }
-        return request.getHttpRequest().uri().substring(trim);
+        return trim;
     }
 
     @Override
