Post a configuration of a contraction hierarchies network

post

/chrest/v1/configuration

By passing in the Network Configuration Request in json/xml, you can configure contraction hierarchies networks.

Request

Supported Media Types
Body ()
Specify operation like contraction hierarchies network creation, loading, or metadata query.
Root Schema : NetworkConfigurationRequest
Type: object
Show Source
Nested Schema : CreateNetworkRequest
Type: object
Show Source
Nested Schema : LoadNetworkRequest
Type: object
Show Source
Nested Schema : MetadataRequest
Type: object
Show Source
  • Name of generated contraction hierarchies network
    Example: sample
Nested Schema : secondaryCostScaleFactors
Type: array
Show Source
Nested Schema : secondaryCostUnits
Type: array
Show Source
Nested Schema : secondaryLinkCostColumns
Type: array
Show Source
Back to Top

Response

Supported Media Types

200 Response

Indicating either the request is being processed or error messages.
Body ()
Root Schema : NetworkConfigurationResponse
Type: object
Show Source
Nested Schema : CreateNetworkResponse
Type: object
Show Source
Nested Schema : LoadNetworkResponse
Type: object
Show Source
Nested Schema : MetadataResponse
Type: object
Show Source
Nested Schema : secondaryCostScaleFactors
Type: array
Show Source
Nested Schema : secondaryCostUnits
Type: array
Show Source
Nested Schema : secondaryLinkCostColumns
Type: array
Show Source
Back to Top

Examples

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.

curl -v -X POST "https://localhost:8011/chrest/v1/configuration" -H "Content-Type: application/json" -d @request_body.json 

Example of Request Body

The following example shows how to create a contraction hierarchies network.

{"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] }}					

The following example shows how to load a contraction hierarchies network.

{"loadNetworkRequest":{"chName":"example","networkName":"NETWORK_NAME","considerTurnRestrictions":false}}				

The following example shows how to get the metadata of a contraction hierarchies network.

{"metadataRequest":{"chName":"example"}}				

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK Date: Tue, 14 Jan 2020 18:37:21 GMT Content-Type: application/json; charset=UTF-8

Example of Response Body

The following example shows the contents of the response body in JSON format of create network request.

{"createNetworkResponse" : {"response" : "Contraction hierarchies network model is being built."}}			

The following example shows the contents of the response body in JSON format of load network request.

{"loadNetworkResponse" : {"response" : "Contraction hierarchies network model is being loaded."}}				

The following example shows the contents of the response body in JSON format of metadata request.

{"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 ]}}			
Back to Top