module.exports = function(kibana) {
  return new kibana.Plugin({

    // Export the front-end visualization definition.
    uiExports: {
      visTypes: [
        "plugins/kibana-chord/chord"
      ]
    },

    // Define our custom server-side middleware for
    // custom ElasticSearch queries.
    init: function (server, options) {
      server.route({
        path: "/api/kibana-chord/{source}/{destination}",
        method: "GET",
        handler(req, reply) {
          reply([
            "Source: " + req.params.source,
            "Destination: " + req.params.destination
          ].join("<br>"));
        }
      });
    }

  });
};

module.exports = function(kibana) {
  return new kibana.Plugin({

    // Export the front-end visualization definition.
    uiExports: {
      visTypes: [
        "plugins/kibana-chord/chord"
      ]
    },

    // Define our custom server-side middleware for
    // custom ElasticSearch queries.
    init: function (server, options) {
      server.route({
        path: "/api/kibana-chord/{source}/{destination}",
        method: "GET",
        handler(req, reply) {
          reply("Hello World");
        }
      });
    }

  });
};

--- 
+++ 
@@ -15,7 +15,10 @@
         path: "/api/kibana-chord/{source}/{destination}",
         method: "GET",
         handler(req, reply) {
-          reply("Hello World");
+          reply([
+            "Source: " + req.params.source,
+            "Destination: " + req.params.destination
+          ].join("<br>"));
         }
       });
     }
Access source and destination parameters in middleware
