---
title: "GET /route"
canonical: "https://docs.perspectium.com/space/apisdk/1704004/GET%20%2Froute"
format: markdown
---
The  GET /route  REST API makes an AJAX call to the RouteServlet. If successful, this call will return a JSON object with the field  route  which holds an array that contains a JSON object for each of the selected application's routes. REST Method & Endpoint   /route/{selectedApp}/{app_id} Parameters Parameter Description Required? Data Type Example selectedApp Name of the application you are trying to access Yes string aggregator app_id Unique identifier for the application you are integrating with Yes string 9fc2cdc3-876a-8888-a919-df42a46f9001 Responses HTTP Status Code Reason 200 The call has successfully returned a JSON object with the field  route  which holds an array that contains a JSON object for each of the selected applications' routes. 400 RouteServlet returns a JSON object with an  error  field that holds an error message that provides more details as to what went wrong then gracefully return and exit AJAX Call $.ajax({
    url: "/route/" + selectedApp + "/" + app_id,
    async: false,
    success: function(resp) {
    	// Create a node for every route returned
    	for(var w in resp.route)					
    		createNode(resp.route[w], nodes);
    	       		
    	// Clear the graph of anything left over from the previous selections and then add the nodes
    	graph.clear();
    	graph.addCells(nodes);
    	// check to see if the input queue contains a ',' to see if there are multiple input queues
    	if(inputQueues[selectedApp].indexOf(',') != -1) {
    	  	var queues = inputQueues[selectedApp].split(",");
    	  	multipleInputQueues(queues);
    	  	return;
    	}
    	  		    
    	// Otherwise there is only 1 input queue and we can go check how to connect it 
    	inputQueueLinks();
    	},
    	error: function(resp) {
    		$.psp.message(resp.error);
    		return;
    	}
    }); SQL Query SELECT * FROM psp_route WHERE psp_app_id = '<url_param[1]>'; Example  get /route/aggregator/9fc2cdc3-876a-8888-a919-df42a46f9001