{
    "swagger":"2.0",
    "info":{
        "description":"Spatial Network Data Model Contraction Hierarchies REST API",
        "version":"2021.02.26",
        "title":"REST API for Spatial Network Data Model Contraction Hierarchies",
        "contact":{
            "email":"xiangtai.hou@oracle.com"
        },
        "license":{
            "name":"Apache 2.0",
            "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "x-summary":"Spatial Network Data Model Contraction Hierarchies REST API"
    },
    "basePath":"/chrest/v1",
    "tags":[
        {
            "name":"Analysis API",
            "description":"Apply spatial analysis on contraction hierarchies networks"
        },
        {
            "name":"Configuration API",
            "description":"Configure contraction hierarchies networks"
        }
    ],
    "schemes":[
        "https",
        "http"
    ],
    "paths":{
        "/configuration":{
            "post":{
                "tags":[
                    "Configuration API"
                ],
                "summary":"Post a configuration of a contraction hierarchies network",
                "description":"By passing in the Network Configuration Request in json/xml, you can configure contraction hierarchies networks. <div class=\"examples\">     <div class=\"section\">    <p class=\"p\">The following example shows how to configure contraction hierarchies network by submitting a POST request on the REST resource using cURL. Depending on the operation specified in the requestbody, the configuration job can be creating, loading a contraction hierarchies network or getting meatadata of a contraction hierarchies network.</p> <pre class=\"pre\">curl -v -X POST \"https://localhost:8011/chrest/v1/configuration\" -H \"Content-Type: application/json\" -d @request_body.json </pre>    </div>    <div class=\"section\">  <h2 class=\"title sectiontitle\">Example of Request Body</h2>     <p class=\"p\">The following example shows how to create a contraction hierarchies network.</p>      <pre class=\"pre\">{\"createNetworkRequest\": { \"chName\":\"example\", \"networkName\":\"NETWORK_NAME\", \"dbUrl\":\"jdbc:oracle:thin:@localhost:port:sid\", \"dbUser\":\"username\", \"dbPassword\":\"password\", \"processGeometry\":true, \"processTurnRestrictions\":false, \"primaryLinkCostColumn\":\"LENGTH\", \"primaryCostUnit\":\"meter\", \"primaryCostScaleFactor\":10, \"secondaryLinkCostColumns\":[\"LENGTH/S\"], \"secondaryCostUnits\":[\"second\"], \"secondaryCostScaleFactors\":[10] }}\t\t\t\t\t</pre>   <p class=\"p\">The following example shows how to load a contraction hierarchies network.</p>      <pre class=\"pre\">{\"loadNetworkRequest\":{\"chName\":\"example\",\"networkName\":\"NETWORK_NAME\",\"considerTurnRestrictions\":false}}\t\t\t\t</pre>  <p class=\"p\">The following example shows how to get the metadata of a contraction hierarchies network.</p>      <pre class=\"pre\">{\"metadataRequest\":{\"chName\":\"example\"}}\t\t\t\t</pre>  \t\t\t\t\t\t\t\t\t</div>  <div class=\"section\"> <h2 class=\"title sectiontitle\">Example of Response Header</h2>    <p class=\"p\">The following shows an example of the response header.</p>     <pre class=\"pre\">HTTP/1.1 200 OK Date: Tue, 14 Jan 2020 18:37:21 GMT Content-Type: application/json; charset=UTF-8</pre>    </div>    <div class=\"section\">    <h2 class=\"title sectiontitle\">Example of Response Body</h2>   <p class=\"p\">The following example shows the contents of the response body in JSON format of create network request.</p>     <pre class=\"pre\">{\"createNetworkResponse\" : {\"response\" : \"Contraction hierarchies network model is being built.\"}}\t\t\t</pre><p class=\"p\">The following example shows the contents of the response body in JSON format of load network request.</p>     <pre class=\"pre\">{\"loadNetworkResponse\" : {\"response\" : \"Contraction hierarchies network model is being loaded.\"}}\t\t\t\t</pre>\t\t\t\t\t\t\t\t <p class=\"p\">The following example shows the contents of the response body in JSON format of metadata request.</p>     <pre class=\"pre\">{\"metadataResponse\" : {\"chName\" : \"sample\",\"networkName\" : \"NETWORK_NAME\",\"dbUrl\" : \"jdbc:oracle:thin:@localhost:port:sid\",\"dbUser\" : \"xth\",\"processNodeGeometries\" : true,\"processLinkGeometries\" : true,\"processTurnRestrictions\" : false,\"primaryLinkCostColumn\" : \"LENGTH\",\"secondaryLinkCostColumns\" : [ \"LENGTH/S\" ],\"primaryCostUnit\" : \"meter\",\"secondaryCostUnits\" : [ \"second\" ],\"primaryCostScaleFactor\" : 10.0,\"secondaryCostScaleFactors\" : [ 10.0 ]}}\t\t\t</pre></div></div> ",
                "operationId":"configuration",
                "consumes":[
                    "application/json",
                    "application/xml"
                ],
                "produces":[
                    "application/json",
                    "application/xml"
                ],
                "parameters":[
                    {
                        "in":"body",
                        "name":"networkConfigurationRequest",
                        "description":"Specify operation like contraction hierarchies network creation, loading, or metadata query.",
                        "required":false,
                        "schema":{
                            "$ref":"#/definitions/NetworkConfigurationRequest"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Indicating either the request is being processed or error messages.",
                        "schema":{
                            "$ref":"#/definitions/NetworkConfigurationResponse"
                        }
                    }
                },
                "x-internal-id":"configuration-post",
                "x-filename-id":"configuration-post"
            }
        },
        "/configuration/networks":{
            "get":{
                "tags":[
                    "Configuration API"
                ],
                "summary":"Get available contraction hierarchies networks",
                "description":"List all available contraction hierarchies networks and status. <div class=\"examples\">     <div class=\"section\">    <p class=\"p\">The following example shows how to view all contraction hierarchies networks.</p> <pre class=\"pre\">curl -v -X GET \"https://localhost:8011/chrest/v1/configuration/networks\"</pre>    </div>    <div class=\"section\"> <h2 class=\"title sectiontitle\">Example of Response Header</h2>    <p class=\"p\">The following shows an example of the response header.</p>     <pre class=\"pre\">HTTP/1.1 200 OK Date: Tue, 14 Jan 2020 18:35:41 GMT Content-Type: application/json; charset=UTF-8</pre>    </div>    <div class=\"section\">    <h2 class=\"title sectiontitle\">Example of Response Body</h2>    <p class=\"p\">The following example shows the contents of the response body in JSON format.</p>     <pre class=\"pre\">{\"networks\":[{\"chName\":\"sample\",\"networkName\":\"OSM_NY\",\"status\":\"Loaded\"},{\"chName\":\"heresf\",\"networkName\":\"HERE_SF_NET\",\"status\":\"Loaded\"}]}</pre></div></div> ",
                "operationId":"configurationnetworks",
                "produces":[
                    "application/json",
                    "application/xml"
                ],
                "parameters":[
                ],
                "responses":{
                    "200":{
                        "description":"Showing existed contraction hierarchies networks and status.",
                        "schema":{
                            "$ref":"#/definitions/AvailableNetworksResponse"
                        }
                    }
                },
                "x-internal-id":"configuration-networks-get",
                "x-filename-id":"configuration-networks-get"
            }
        },
        "/analysis":{
            "post":{
                "tags":[
                    "Analysis API"
                ],
                "summary":"Post an analysis on a contraction hierarchies network",
                "description":"By passing in the Network Analysis Request in json/xml, you can run analysis on the contraction hierarchies network. <div class=\"examples\">     <div class=\"section\">    <p class=\"p\">The following example shows how to perform network analysis on a contraction hierarchies network by submitting a POST request on the REST resource using cURL. Depending on the operationspecified in the request body, the analysis job can be shortest path, multi stop shortest path, cost matrix, TSP, alternative paths or secondary cost.</p> <pre class=\"pre\">curl -v -X POST \"https://localhost:8011/chrest/v1/analysis\" -H \"Content-Type: application/json\" -d @request_body.json </pre>    </div>    <div class=\"section\">  <h2 class=\"title sectiontitle\">Example of Request Body</h2>     <p class=\"p\">The following example shows how to perform a shortest path analysis in the request body.</p> <pre class=\"pre\">{\"chName\":\"sample\",\"shortestPathRequest\":{\"startPoints\" : { \"pointOnNet\" : [ { \"linkId\" : 238135, \"percentage\" : 0.28 } ] }, \"endPoints\" : { \"pointOnNet\" : [ { \"linkId\" : 261315, \"percentage\" : 0.93 }] }, \"geometry\":false}} </pre>   <p class=\"p\">The following example shows how to perform a multi stop shortest path analysis in the request body.</p> <pre class=\"pre\">{\"chName\":\"sample\",\"multiStopShortestPathRequest\":{\"waypoints\" : [ {\"pointOnNet\" : [ {\"linkId\":266427,\"percentage\":0.5}]}, {\"pointOnNet\" : [ {\"linkId\":238135,\"percentage\":0.7}]}, {\"pointOnNet\" : [ {\"linkId\":106841,\"percentage\":0.1}]} ], \"geometry\":false}} </pre>  <p class=\"p\">The following example shows how to perform a cost matrix analysis in the request body.</p> <pre class=\"pre\">{\"chName\":\"sample\",\"costMatrixRequest\":{\"startPoints\" : [ {\"pointOnNet\" : [ {\"linkId\":266427,\"percentage\":0.3}]}, {\"pointOnNet\" : [ {\"linkId\":238135,\"percentage\":0.2}]}, {\"pointOnNet\" : [ {\"linkId\":106841,\"percentage\":0.7}]}, {\"pointOnNet\" : [ {\"linkId\":261315,\"percentage\":0.5}]}],\"endPoints\" : [ {\"pointOnNet\" : [ {\"linkId\":266427,\"percentage\":0.3}]}, {\"pointOnNet\" : [ {\"linkId\":238135,\"percentage\":0.2}]}, {\"pointOnNet\" : [ {\"linkId\":106841,\"percentage\":0.7}]}, {\"pointOnNet\" : [ {\"linkId\":261315,\"percentage\":0.5}]}]}} </pre>  <p class=\"p\">The following example shows how to perform a TSP analysis in the request body.</p> <pre class=\"pre\">{\"chName\":\"sample\",\"tspRequest\":{\"geometry\":false,\"tourFlag\":\"CLOSED\",\"tspPoints\" : [ {\"pointOnNet\" : [ {\"linkId\":266427,\"percentage\":0.5} ]}, {\"pointOnNet\" : [ {\"linkId\":238135,\"percentage\":0.7} ]}, {\"pointOnNet\" : [ {\"linkId\":106841,\"percentage\":0.1} ]} ]}}\t\t</pre>  \t<p class=\"p\">The following example shows how to perform an alternative paths analysis in the request body.</p> <pre class=\"pre\">{\"chName\":\"sample\",\"alternativePathsRequest\":{\"startPoints\" : { \"pointOnNet\" : [ { \"linkId\":238135, \"percentage\":0.28 }] }, \"endPoints\" : { \"pointOnNet\" : [ { \"linkId\":261315, \"percentage\":0.93 }] }, \"k\":4,\"maxCost\":10000,\"maxSimilarity\":0.5,\"geometry\":false}} </pre><p class=\"p\">The following example shows how to perform a secondary cost query in the request body.</p>        <pre class=\"pre\">{\"chName\":\"sample\",\"secondaryCostRequest\" : {\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 43,\"endPercentage\" : 0.93,\"cost\" : 2906.6,\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42452620, 42457292, 42444271, 42440270, 42440271, 673008453, 42440278, 42440280, 42440282, 42440284, 42440287, 42428385, 42440290, 42453943,42453952, 42430004, 42429562, 42449597, 42431611, 42445356, 42445357, 42436322, 42430571, 42430529, 42429833, 42436326, 42436327, 42436330, 42436333, 42436335, 42436336, 42424610, 1104165608, 42436308,42424408, 42436340, 42436014, 4142105822, 42424619, 42424630, 42423514 ],\"linkIds\" : [ 238135, 69834, 69856, 187992, 39327, 39328, 18867, 189084, 189085, 189086, 189087, 142716, 142717, 142718, 142719, 142720, 193362, 193363, 54588, 54589, 54657, 153376, 68912, 61331,61332, 177603, 177604, 177605, 177606, 177607, 106801, 96723, 96724, 96725, 96726, 65028, 176816, 176817, 65012, 65013, 65014, 65015, 261314, 261315 ]}}</pre> </div>  <div class=\"section\"> <h2 class=\"title sectiontitle\">Example of Response Header</h2>    <p class=\"p\">The following shows an example of the response header.</p> <pre class=\"pre\">HTTP/1.1 200 OK Date: Tue, 14 Jan 2020 18:33:10 GMT Content-Type: application/json; charset=UTF-8</pre>    </div>    <div class=\"section\">    <h2 class=\"title sectiontitle\">Example of Response Body</h2>   <p class=\"p\">The following example shows the contents of the response body in JSON format of shoetest path request.</p> <pre class=\"pre\">{\"shortestPathResponse\" : {\"cost\" : 2906.6,\"linkIds\" : [ 238135, 69834, 69856, 187992, 39327, 39328, 18867, 189084, 189085, 189086, 189087, 142716, 142717, 142718, 142719, 142720, 193362, 193363, 54588, 54589, 54657, 153376, 68912, 61331,61332, 177603, 177604, 177605, 177606, 177607, 106801, 96723, 96724, 96725, 96726, 65028, 176816, 176817, 65012, 65013, 65014, 65015, 261314, 261315 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42452620, 42457292, 42444271, 42440270, 42440271, 673008453, 42440278, 42440280, 42440282, 42440284, 42440287, 42428385, 42440290, 42453943,42453952, 42430004, 42429562, 42449597, 42431611, 42445356, 42445357, 42436322, 42430571, 42430529, 42429833, 42436326, 42436327, 42436330, 42436333, 42436335, 42436336, 42424610, 1104165608, 42436308,42424408, 42436340, 42436014, 4142105822, 42424619, 42424630, 42423514 ],\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 43,\"endPercentage\" : 0.93},\"unit\" : \"meter\"} </pre><p class=\"p\">The following example shows the contents of the response body in JSON format of multi stop shortest path request.</p> <pre class=\"pre\">{\"multiStopShortestPathResponse\" : {\"shortestPath\" : [ {\"cost\" : 1866.8,\"linkIds\" : [ 266427, 65042, 65043, 65044, 65045, 65046, 65047, 120252, 120253, 171960, 249986, 84903, 245429, 245428, 145039, 145040, 136666, 273041, 136680, 136681, 136682, 183653, 183654, 140917,140918, 239060, 239061, 239122, 238135 ],\"nodeIds\" : [ 42427316, 42440815, 42445484, 42445481, 42445479, 42445474, 42445469, 42445466, 42430535, 42427278, 272195272, 370705004, 2821304146, 4207802394, 2821304145, 1272562931, 42427236,42427239, 42427242, 42457311, 42430848, 42440280, 42456583, 42440345, 42433330, 42440347, 42440350, 42440353, 42427254, 42427256 ],\"startIndex\" : 0,\"startPercentage\" : 0.5,\"endIndex\" : 28,\"endPercentage\" : 0.7}, {\"cost\" : 2927.6,\"linkIds\" : [ 238135, 69834, 69856, 187992, 39327, 39328, 18867, 189084, 189085, 189086, 189087, 142716, 142717, 142718, 142719, 142720, 193362, 193363, 54588, 54589, 54657, 153376, 68912, 68913,68914, 68915, 68916, 68917, 267738, 267739, 267740, 21173, 64994, 64995, 106837, 106838, 106839, 106840, 106841 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42452620, 42457292, 42444271, 42440270, 42440271, 673008453, 42440278, 42440280, 42440282, 42440284, 42440287, 42428385, 42440290, 42453943,42453952, 42430004, 42429562, 42449597, 42431611, 42445356, 42430550, 42429830, 42452817, 42448171, 4143851142, 42430115, 42430118, 42430122, 42430126, 42440829, 42452026, 42433574, 42452040, 42449570,42428436, 42452048 ],\"startIndex\" : 0,\"startPercentage\" : 0.7,\"endIndex\" : 38,\"endPercentage\" : 0.1} ]},\"unit\" : \"meter\"}\t\t\t</pre> <p class=\"p\">The following example shows the contents of the response body in JSON format of cost matrix request.</p>     <pre class=\"pre\">{\"costMatrixResponse\" : {\"costMatrix\" : [ [ 0.0, 1835.3, 739.5, 985.4 ], [ 2516.9, 0.0, 3021.5, 2908.5 ], [ 532.1, 2111.8, 0.0, 1214.1 ], [ 7234.0, 8631.4, 7276.2, 0.0 ] ]},\"unit\" : \"meter\"}\t\t\t\t</pre><p class=\"p\">The following example shows the contents of the response body in JSON format of cost TSP request.</p>     <pre class=\"pre\">{\"tspResponse\" : {\"order\" : [ 0, 2, 1, 0 ],\"shortestPath\" : [ {\"cost\" : 677.1,\"linkIds\" : [ 266427, 266428, 243579, 243580, 243581, 189839, 106839, 106840, 106841 ],\"nodeIds\" : [ 42427316, 42440815, 591995273, 42428433, 42440820, 42440823, 42452040, 42449570, 42428436, 42452048 ],\"startIndex\" : 0,\"startPercentage\" : 0.5,\"endIndex\" : 8,\"endPercentage\" : 0.1}, {\"cost\" : 2205.7,\"linkIds\" : [ 106841, 106842, 65040, 65041, 65042, 65043, 65044, 65045, 65046, 65047, 120252, 120253, 171960, 249986, 84903, 245429, 245428, 145039, 145040, 136666, 273041, 136680, 136681, 136682,183653, 183654, 140917, 140918, 239060, 239061, 239122, 238135 ],\"nodeIds\" : [ 42428436, 42452048, 42445489, 42439580, 42440815, 42445484, 42445481, 42445479, 42445474, 42445469, 42445466, 42430535, 42427278, 272195272, 370705004, 2821304146, 4207802394, 2821304145,1272562931, 42427236, 42427239, 42427242, 42457311, 42430848, 42440280, 42456583, 42440345, 42433330, 42440347, 42440350, 42440353, 42427254, 42427256 ],\"startIndex\" : 0,\"startPercentage\" : 0.1,\"endIndex\" : 31,\"endPercentage\" : 0.7}, {\"cost\" : 2485.5,\"linkIds\" : [ 238135, 69834, 69856, 69857, 69858, 69859, 162438, 162439, 162440, 162441, 162442, 189127, 187872, 151596, 191849, 191850, 191851, 191852, 191853, 212498, 192902, 192903, 192904, 269840,4401, 4403, 4404, 4402, 174674, 266425, 266426, 266427 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42433218, 42433243, 42438476, 278609760, 42444108, 1538237325, 42437135, 588455857, 588455858, 42452556, 42437465, 42448430, 42437755, 42435916,42433539, 42453691, 1773066054, 42437564, 541467364, 4202950100, 2481865390, 4202984490, 42440804, 4202984491, 42432246, 42435451, 42440810, 42427316, 42440815 ],\"startIndex\" : 0,\"startPercentage\" : 0.7,\"endIndex\" : 31,\"endPercentage\" : 0.5} ]},\"unit\" : \"meter\"}\t\t\t</pre><p class=\"p\">The following example shows the contents of the response body in JSON format of cost alternative paths request.</p>     <pre class=\"pre\">{\"alternativePathsResponse\" : {\"shortestPath\" : [ {\"cost\" : 2906.6,\"linkIds\" : [ 238135, 69834, 69856, 187992, 39327, 39328, 18867, 189084, 189085, 189086, 189087, 142716, 142717, 142718, 142719, 142720, 193362, 193363, 54588, 54589, 54657, 153376, 68912, 61331,61332, 177603, 177604, 177605, 177606, 177607, 106801, 96723, 96724, 96725, 96726, 65028, 176816, 176817, 65012, 65013, 65014, 65015, 261314, 261315 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42452620, 42457292, 42444271, 42440270, 42440271, 673008453, 42440278, 42440280, 42440282, 42440284, 42440287, 42428385, 42440290, 42453943,42453952, 42430004, 42429562, 42449597, 42431611, 42445356, 42445357, 42436322, 42430571, 42430529, 42429833, 42436326, 42436327, 42436330, 42436333, 42436335, 42436336, 42424610, 1104165608, 42436308,42424408, 42436340, 42436014, 4142105822, 42424619, 42424630, 42423514 ],\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 43,\"endPercentage\" : 0.93}, {\"cost\" : 3500.4,\"linkIds\" : [ 238135, 69834, 69856, 69857, 69858, 69859, 162438, 162439, 162440, 162441, 162442, 189127, 187872, 151596, 191849, 191850, 191851, 191852, 191853, 212498, 192902, 192903, 192904, 269840,4401, 4403, 4404, 4402, 174674, 266425, 266426, 266427, 266428, 243579, 243580, 243581, 243582, 243583, 243584, 243585, 238101, 267063, 267064, 267065, 44933, 222847, 262049, 60078, 261315 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42433218, 42433243, 42438476, 278609760, 42444108, 1538237325, 42437135, 588455857, 588455858, 42452556, 42437465, 42448430, 42437755, 42435916,42433539, 42453691, 1773066054, 42437564, 541467364, 4202950100, 2481865390, 4202984490, 42440804, 4202984491, 42432246, 42435451, 42440810, 42427316, 42440815, 591995273, 42428433, 42440820, 42440823,42440825, 42433573, 42440829, 4143859873, 3788379733, 42439550, 42440838, 4142105813, 4215665530, 42426089, 42426060, 42424630, 42423514 ],\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 48,\"endPercentage\" : 0.93}, {\"cost\" : 4216.8,\"linkIds\" : [ 238135, 69834, 69856, 69857, 69858, 69859, 162438, 162439, 190987, 65527, 158770, 268162, 268163, 268164, 120254, 18865, 18866, 18867, 189084, 189085, 189086, 189087, 142716, 142717,142718, 142719, 142720, 193362, 193363, 54743, 54744, 54745, 54746, 166527, 164507, 71481, 44960, 54569, 71466, 71479, 56333, 56334, 56335, 61737, 61738, 61739, 65013, 73453, 164349, 44933, 222847,262049, 60078, 261315 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42433218, 42433243, 42438476, 278609760, 42444108, 205025778, 587988061, 3884569931, 3884569924, 278609934, 42422283, 42433229, 3815141536,42444271, 42440270, 42440271, 673008453, 42440278, 42440280, 42440282, 42440284, 42440287, 42428385, 42440290, 42453943, 42453952, 42454401, 272194254, 42459493, 42453398, 4207143415, 42429570,4215665527, 42449613, 42431626, 42453417, 4207143418, 42436316, 42440918, 4207143421, 42438060, 42436069, 42436340, 42436014, 4629486879, 4142105813, 4215665530, 42426089, 42426060, 42424630, 42423514 ],\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 53,\"endPercentage\" : 0.93}, {\"cost\" : 5675.7,\"linkIds\" : [ 238135, 69834, 69856, 69857, 69858, 69859, 162438, 162439, 162440, 162441, 162442, 162443, 162444, 162445, 239706, 239707, 239708, 239709, 140872, 140873, 140874, 140875, 214174, 108407,205268, 205269, 205259, 205260, 236593, 236594, 137109, 137110, 224638, 224639, 224640, 224641, 224642, 224643, 224644, 191256, 191239, 129946, 129947, 129948, 172145, 20690, 172143, 172119, 172144,274972, 274973, 274974, 274975, 274976, 65038, 226384, 226385, 226386, 226387, 226388, 226389, 163530, 163531, 44841, 44957, 44958, 44959, 44956, 267065, 44933, 222847, 262049, 60078, 261315 ],\"nodeIds\" : [ 42427254, 42427256, 42440356, 3350498747, 42433218, 42433243, 42438476, 278609760, 42444108, 1538237325, 42437135, 588455857, 42444116, 42444123, 42444129, 42443928, 42443937, 4581870335,42440449, 479847982, 42437503, 42437770, 42435928, 42433551, 42440408, 42432094, 3630249566, 42435534, 42427340, 42427345, 42427346, 42437067, 42437071, 42437074, 42437078, 42437082, 42437084, 42437096,42437106, 42437108, 42437109, 486868873, 42429645, 42429756, 4202930753, 4539951609, 486869282, 4202930754, 1773076511, 42429752, 42430030, 42430034, 42430038, 42430041, 42430044, 42432165, 42432161,42428438, 42432156, 42432152, 42432148, 42432142, 42436770, 42430143, 42423456, 4602414021, 42452015, 4215665529, 42440838, 4142105813, 4215665530, 42426089, 42426060, 42424630, 42423514 ],\"startIndex\" : 0,\"startPercentage\" : 0.28,\"endIndex\" : 73,\"endPercentage\" : 0.93} ]},\"unit\" : \"meter\"}</pre><p class=\"p\">The following example shows the contents of the response body in JSON format of secondary cost request.</p>     <pre class=\"pre\">{\"secondaryCostResponse\" : {\"secondaryCost\" : [ {\"cost\" : 108.2,\"unit\" : \"second\"} ]}}</pre></div></div>",
                "operationId":"analysis",
                "consumes":[
                    "application/json",
                    "application/xml"
                ],
                "produces":[
                    "application/json",
                    "application/xml"
                ],
                "parameters":[
                    {
                        "in":"body",
                        "name":"networkAnalysisRequest",
                        "description":"Specify operations on contraction hierarchies networks.",
                        "required":false,
                        "schema":{
                            "$ref":"#/definitions/NetworkAnalysisRequest"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Analysis result in JSON/XML.",
                        "schema":{
                            "$ref":"#/definitions/NetworkAnalysisResponse"
                        }
                    }
                },
                "x-internal-id":"analysis-post",
                "x-filename-id":"analysis-post"
            }
        }
    },
    "definitions":{
        "NetworkConfigurationRequest":{
            "type":"object",
            "properties":{
                "metadataRequest":{
                    "$ref":"#/definitions/MetadataRequest"
                },
                "createNetworkRequest":{
                    "$ref":"#/definitions/CreateNetworkRequest"
                },
                "loadNetworkRequest":{
                    "$ref":"#/definitions/LoadNetworkRequest"
                }
            }
        },
        "NetworkConfigurationResponse":{
            "type":"object",
            "properties":{
                "metadataResponse":{
                    "$ref":"#/definitions/MetadataResponse"
                },
                "createNetworkResponse":{
                    "$ref":"#/definitions/CreateNetworkResponse"
                },
                "loadNetworkResponse":{
                    "$ref":"#/definitions/LoadNetworkResponse"
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "AvailableNetworksResponse":{
            "type":"object",
            "properties":{
                "networks":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/AvailableNetworksResponse_networks"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "MetadataRequest":{
            "type":"object",
            "required":[
                "chName"
            ],
            "properties":{
                "chName":{
                    "type":"string",
                    "example":"sample",
                    "description":"Name of generated contraction hierarchies network"
                }
            }
        },
        "MetadataResponse":{
            "type":"object",
            "properties":{
                "chName":{
                    "type":"string",
                    "description":"Name of generated contraction hierarchies network."
                },
                "networkName":{
                    "type":"string"
                },
                "networkVersion":{
                    "type":"string"
                },
                "dbUrl":{
                    "type":"string"
                },
                "dbUser":{
                    "type":"string"
                },
                "processNodeGeometries":{
                    "type":"boolean"
                },
                "processLinkGeometries":{
                    "type":"boolean"
                },
                "processTurnRestrictions":{
                    "type":"boolean"
                },
                "primaryLinkCostColumn":{
                    "type":"string"
                },
                "primaryCostUnit":{
                    "type":"string"
                },
                "primaryCostScaleFactor":{
                    "type":"integer"
                },
                "secondaryLinkCostColumns":{
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "secondaryCostUnits":{
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "secondaryCostScaleFactors":{
                    "type":"array",
                    "items":{
                        "type":"integer"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "CreateNetworkRequest":{
            "type":"object",
            "required":[
                "chName",
                "dbPassword",
                "dbUrl",
                "dbUser",
                "networkName"
            ],
            "properties":{
                "chName":{
                    "type":"string",
                    "example":"sample",
                    "description":"Name of generated contraction hierarchies network."
                },
                "networkName":{
                    "type":"string",
                    "example":"HERE_SF_NET"
                },
                "dbUrl":{
                    "type":"string"
                },
                "dbUser":{
                    "type":"string"
                },
                "dbPassword":{
                    "type":"string"
                },
                "processGeometry":{
                    "type":"boolean"
                },
                "processTurnRestrictions":{
                    "type":"boolean"
                },
                "primaryLinkCostColumn":{
                    "type":"string"
                },
                "primaryCostUnit":{
                    "type":"string"
                },
                "primaryCostScaleFactor":{
                    "type":"integer"
                },
                "secondaryLinkCostColumns":{
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "secondaryCostUnits":{
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "secondaryCostScaleFactors":{
                    "type":"array",
                    "items":{
                        "type":"integer"
                    }
                }
            }
        },
        "CreateNetworkResponse":{
            "type":"object",
            "properties":{
                "resposne":{
                    "type":"string",
                    "example":"Contraction hierarchies network model is being built."
                }
            }
        },
        "LoadNetworkRequest":{
            "type":"object",
            "required":[
                "chName",
                "networkName"
            ],
            "properties":{
                "chName":{
                    "type":"string",
                    "example":"sample",
                    "description":"Name of generated contraction hierarchies network."
                },
                "networkName":{
                    "type":"string",
                    "example":"HERE_SF_NET"
                },
                "considerTurnRestrictions":{
                    "type":"boolean"
                }
            }
        },
        "LoadNetworkResponse":{
            "type":"object",
            "properties":{
                "resposne":{
                    "type":"string",
                    "example":"Contraction hierarchies network model is being loaded."
                }
            }
        },
        "NetworkAnalysisRequest":{
            "type":"object",
            "required":[
                "chName"
            ],
            "properties":{
                "chName":{
                    "type":"string",
                    "example":"sample",
                    "description":"Name of generated contraction hierarchies network."
                },
                "shortestPathRequest":{
                    "$ref":"#/definitions/ShortestPathRequest"
                },
                "multiStopShortestPathRequest":{
                    "$ref":"#/definitions/MultiStopShortestPathRequest"
                },
                "tspRequest":{
                    "$ref":"#/definitions/TspRequest"
                },
                "costMatrixRequest":{
                    "$ref":"#/definitions/CostMatrixRequest"
                },
                "alternativePathsRequest":{
                    "$ref":"#/definitions/AlternativePathsRequest"
                },
                "secondaryCostRequest":{
                    "$ref":"#/definitions/SecondaryCostRequest"
                }
            }
        },
        "NetworkAnalysisResponse":{
            "type":"object",
            "properties":{
                "error":{
                    "type":"string",
                    "example":"Invalid input request."
                },
                "unit":{
                    "type":"string",
                    "enum":[
                        "meter",
                        "second"
                    ]
                },
                "shortestPathResponse":{
                    "$ref":"#/definitions/ShortestPathResponse"
                },
                "multiStopShortestPathResponse":{
                    "$ref":"#/definitions/MultiStopShortestPathResponse"
                },
                "tspResponse":{
                    "$ref":"#/definitions/TspResponse"
                },
                "costMatrixResponse":{
                    "$ref":"#/definitions/CostMatrixResponse"
                },
                "alternativePathsResponse":{
                    "$ref":"#/definitions/AlternativePathsResponse"
                },
                "secondaryCostResponse":{
                    "$ref":"#/definitions/SecondaryCostResponse"
                }
            }
        },
        "ShortestPathRequest":{
            "type":"object",
            "properties":{
                "startPoints":{
                    "$ref":"#/definitions/PointOnNets"
                },
                "endPoints":{
                    "$ref":"#/definitions/PointOnNets"
                },
                "geometry":{
                    "type":"boolean",
                    "example":true,
                    "description":"return geoemtry information in reponse or not"
                },
                "logicalPath":{
                    "type":"boolean",
                    "example":true,
                    "description":"return logical path information(logical node id array and logical link id array) in reponse or not"
                }
            }
        },
        "ShortestPathResponse":{
            "type":"object",
            "properties":{
                "cost":{
                    "type":"number"
                },
                "geometry":{
                    "type":"string",
                    "example":"{\"type\":\"LineString\",\"coordinates\":[[-122.44874,37.77361],[-122.44936,37.77352],[-122.44917,37.77258],[-122.4507,37.77237],[-122.45079,37.77236],[-122.45089,37.77234],[-122.45104,37.77232],[-122.45161,37.77225],[-122.45234,37.77216],[-122.45241,37.77215],[-122.45276,37.77206],[-122.45301,37.77195],[-122.45346,37.77172],[-122.45387,37.77153],[-122.45398,37.77148],[-122.45429,37.77136],[-122.4546,37.77123],[-122.45483,37.77114],[-122.4551,37.77103],[-122.4552,37.77097],[-122.45533,37.77086],[-122.45539,37.77077],[-122.45542,37.77071],[-122.45544,37.77065],[-122.45546,37.77053],[-122.45546,37.77042],[-122.4554,37.77033],[-122.45537,37.77023],[-122.45529,37.77005],[-122.45497,37.76945],[-122.45488,37.76921],[-122.45487,37.76914],[-122.45485,37.76902],[-122.45486,37.76878],[-122.45489,37.76863],[-122.45496,37.76847],[-122.45507,37.76835],[-122.45528,37.76822],[-122.45568,37.7681],[-122.45583,37.76805],[-122.45615,37.76796],[-122.45638,37.76789],[-122.45656,37.76784],[-122.45663,37.76782],[-122.45672,37.76779],[-122.45729,37.76762],[-122.45747,37.76756],[-122.45758,37.76753],[-122.45792,37.76742],[-122.45826,37.76732],[-122.45856,37.76723],[-122.45868,37.76719],[-122.45875,37.76716],[-122.45895,37.76708],[-122.45924,37.76689],[-122.45937,37.76679],[-122.45955,37.76665],[-122.45988,37.7664],[-122.46003,37.76629],[-122.46017,37.76624],[-122.46033,37.7662],[-122.46057,37.76618],[-122.46108,37.76616],[-122.46213,37.76611],[-122.46216,37.76611],[-122.46323,37.76607],[-122.4643,37.76604],[-122.46535,37.76598],[-122.46644,37.76593],[-122.4675,37.76588],[-122.46858,37.76583],[-122.4687,37.76582],[-122.46967,37.76578],[-122.47072,37.76574],[-122.4706,37.76385],[-122.4705,37.76228],[-122.47048,37.76204],[-122.47047,37.76194],[-122.47034,37.76011],[-122.47032,37.75989],[-122.47028,37.75925],[-122.47022,37.75836],[-122.47021,37.75825],[-122.47014,37.75754],[-122.47062,37.75751],[-122.47078,37.75752],[-122.47094,37.75756],[-122.47108,37.75764],[-122.47131,37.75783],[-122.47158,37.75811],[-122.47167,37.75787],[-122.47178,37.75772],[-122.47204,37.75755],[-122.47204,37.75741],[-122.47189,37.7573],[-122.4714,37.75709],[-122.47126,37.75701],[-122.47115,37.75689],[-122.47106,37.75678],[-122.47102,37.75668],[-122.47101,37.75647]]}"
                },
                "linkIds":{
                    "type":"array",
                    "description":"array of logical sub path link id in order",
                    "items":{
                        "type":"integer"
                    }
                },
                "nodeIds":{
                    "type":"array",
                    "description":"array of logical sub path node id in order",
                    "items":{
                        "type":"integer"
                    }
                },
                "startIndex":{
                    "type":"integer"
                },
                "startPercentage":{
                    "type":"number"
                },
                "endIndex":{
                    "type":"integer"
                },
                "endPercentage":{
                    "type":"number"
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "MultiStopShortestPathRequest":{
            "type":"object",
            "properties":{
                "waypoints":{
                    "type":"array",
                    "description":"array of multiple stops in point on net",
                    "items":{
                        "$ref":"#/definitions/PointOnNets"
                    }
                },
                "geometry":{
                    "type":"boolean",
                    "example":true,
                    "description":"return geoemtry information in reponse or not"
                },
                "logicalPath":{
                    "type":"boolean",
                    "example":true,
                    "description":"return logical path information(logical node id array and logical link id array) in reponse or not"
                }
            }
        },
        "MultiStopShortestPathResponse":{
            "type":"object",
            "properties":{
                "shortestPath":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/ShortestPathResponse"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "AlternativePathsRequest":{
            "type":"object",
            "properties":{
                "startPoints":{
                    "$ref":"#/definitions/PointOnNets"
                },
                "endPoints":{
                    "$ref":"#/definitions/PointOnNets"
                },
                "geometry":{
                    "type":"boolean",
                    "example":true,
                    "description":"return geoemtry information in reponse or not"
                },
                "logicalPath":{
                    "type":"boolean",
                    "example":true,
                    "description":"return logical path information(logical node id array and logical link id array) in reponse or not"
                },
                "k":{
                    "type":"integer",
                    "description":"return less than k number of alternative path in response"
                },
                "maxCost":{
                    "type":"number",
                    "description":"only return paths that costs are less than maxCost in response"
                },
                "maxSimilarity":{
                    "type":"number",
                    "description":"only return paths that similarity are less than maxSimilarity in response"
                }
            }
        },
        "AlternativePathsResponse":{
            "type":"object",
            "properties":{
                "shortestPath":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/ShortestPathResponse"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "TspRequest":{
            "type":"object",
            "properties":{
                "tspPoints":{
                    "type":"array",
                    "description":"array of point on net",
                    "items":{
                        "$ref":"#/definitions/PointOnNets"
                    }
                },
                "geometry":{
                    "type":"boolean",
                    "example":true,
                    "description":"return geoemtry information in reponse or not"
                },
                "logicalPath":{
                    "type":"boolean",
                    "example":true,
                    "description":"return logical path information(logical node id array and logical link id array) in reponse or not"
                },
                "tourFlag":{
                    "type":"string",
                    "description":"mode of TSP analysis",
                    "enum":[
                        "CLOSED",
                        "OPEN",
                        "OPEN_FIXED_START",
                        "OPEN_FIXED_END",
                        "OPEN_FIXED_START_END"
                    ]
                }
            }
        },
        "TspResponse":{
            "type":"object",
            "properties":{
                "order":{
                    "type":"array",
                    "example":[
                        0,
                        1,
                        2,
                        0
                    ],
                    "description":"visiting order of input tspPoint",
                    "items":{
                        "type":"integer"
                    }
                },
                "shortestPath":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/ShortestPathResponse"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "CostMatrixRequest":{
            "type":"object",
            "properties":{
                "startPoints":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/PointOnNets"
                    }
                },
                "endPoints":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/PointOnNets"
                    }
                }
            }
        },
        "CostMatrixResponse":{
            "type":"object",
            "properties":{
                "costMatrix":{
                    "type":"array",
                    "example":[
                        [
                            0,
                            1835.3,
                            739.5,
                            985.4
                        ],
                        [
                            2516.9,
                            0,
                            3021.5,
                            2908.5
                        ],
                        [
                            532.1,
                            2111.8,
                            0,
                            1214.1
                        ],
                        [
                            7234,
                            8631.4,
                            7276.2,
                            0
                        ]
                    ],
                    "items":{
                        "type":"array",
                        "items":{
                            "type":"number"
                        }
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "SecondaryCostRequest":{
            "type":"object",
            "properties":{
                "linkIds":{
                    "type":"array",
                    "description":"array of logical sub path link id in order",
                    "items":{
                        "type":"integer"
                    }
                },
                "nodeIds":{
                    "type":"array",
                    "description":"array of logical sub path node id in order",
                    "items":{
                        "type":"integer"
                    }
                },
                "startIndex":{
                    "type":"integer"
                },
                "startPercentage":{
                    "type":"number"
                },
                "endIndex":{
                    "type":"integer"
                },
                "endPercentage":{
                    "type":"number"
                },
                "cost":{
                    "type":"number"
                }
            }
        },
        "SecondaryCostResponse":{
            "type":"object",
            "properties":{
                "secondaryCost":{
                    "type":"array",
                    "description":"array of costType",
                    "items":{
                        "$ref":"#/definitions/CostType"
                    }
                },
                "error":{
                    "type":"string"
                }
            }
        },
        "CostType":{
            "type":"object",
            "properties":{
                "cost":{
                    "type":"number",
                    "example":61.3
                },
                "unit":{
                    "type":"string",
                    "example":"second"
                }
            }
        },
        "PointOnNets":{
            "type":"object",
            "properties":{
                "pointOnNet":{
                    "type":"array",
                    "description":"array of PointOnNet",
                    "items":{
                        "$ref":"#/definitions/PointOnNet"
                    }
                }
            }
        },
        "PointOnNet":{
            "type":"object",
            "properties":{
                "nodeId":{
                    "type":"integer",
                    "example":48523598
                },
                "linkId":{
                    "type":"integer",
                    "example":-24579055
                },
                "percentage":{
                    "type":"number",
                    "example":0.5
                }
            }
        },
        "AvailableNetworksResponse_networks":{
            "type":"object",
            "properties":{
                "chName":{
                    "type":"string",
                    "description":"Name of generated contraction hierarchies network"
                },
                "networkName":{
                    "type":"string",
                    "example":"HERE_SF_NET",
                    "description":"Name of NDM network in database"
                },
                "status":{
                    "type":"string",
                    "enum":[
                        "Building",
                        "Loaded",
                        "Failed",
                        "ReadyToLoad"
                    ]
                }
            }
        }
    }
}