Post a configuration of a contraction hierarchies network
/chrest/v1/configuration
Request
- application/json
- application/xml
object
-
chName:
string
Name of generated contraction hierarchies network.Example:
sample
-
dbPassword:
string
-
dbUrl:
string
-
dbUser:
string
-
networkName:
string
Example:
HERE_SF_NET
-
primaryCostScaleFactor(optional):
integer
-
primaryCostUnit(optional):
string
-
primaryLinkCostColumn(optional):
string
-
processGeometry(optional):
boolean
-
processTurnRestrictions(optional):
boolean
-
secondaryCostScaleFactors(optional):
array secondaryCostScaleFactors
-
secondaryCostUnits(optional):
array secondaryCostUnits
-
secondaryLinkCostColumns(optional):
array secondaryLinkCostColumns
object
-
chName:
string
Name of generated contraction hierarchies network.Example:
sample
-
considerTurnRestrictions(optional):
boolean
-
networkName:
string
Example:
HERE_SF_NET
object
-
chName:
string
Name of generated contraction hierarchies networkExample:
sample
Response
- application/json
- application/xml
200 Response
object
-
resposne(optional):
string
Example:
Contraction hierarchies network model is being built.
object
-
resposne(optional):
string
Example:
Contraction hierarchies network model is being loaded.
object
-
chName(optional):
string
Name of generated contraction hierarchies network.
-
dbUrl(optional):
string
-
dbUser(optional):
string
-
error(optional):
string
-
networkName(optional):
string
-
networkVersion(optional):
string
-
primaryCostScaleFactor(optional):
integer
-
primaryCostUnit(optional):
string
-
primaryLinkCostColumn(optional):
string
-
processLinkGeometries(optional):
boolean
-
processNodeGeometries(optional):
boolean
-
processTurnRestrictions(optional):
boolean
-
secondaryCostScaleFactors(optional):
array secondaryCostScaleFactors
-
secondaryCostUnits(optional):
array secondaryCostUnits
-
secondaryLinkCostColumns(optional):
array secondaryLinkCostColumns
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 ]}}