Post a configuration of a contraction hierarchy
https://localhost:7011/chrest/v1/configuration
Request
There are no request parameters for this operation.
- application/json
object
-
booleanLinkUserDataColumns: array
booleanLinkUserDataColumns
-
byteLinkUserDataColumns: array
byteLinkUserDataColumns
-
chName(required): string
Name of generated contraction hierarchy network.Example:
sample
-
costColumns: array
costColumns
-
costScaleFactors(required): array
costScaleFactors
-
costUnits(required): array
costUnits
-
dbUser(required): string
Example:
here_sf
-
floatLinkUserDataColumns: array
floatLinkUserDataColumns
-
intLinkUserDataColumns: array
intLinkUserDataColumns
-
jndiName(required): string
Example:
jdbc/here_sf
-
networkName(required): string
Example:
HERE_SF_NET
-
processGeometry: boolean
Default Value:
false
-
shortLinkUserDataColumns: array
shortLinkUserDataColumns
-
stringLinkUserDataColumns: array
stringLinkUserDataColumns
object
-
chName(required): string
name of generated contraction hierarchy networkExample:
sample
object
-
chName(required): string
Name of generated contraction hierarchy networkExample:
sample
Response
- application/json
200 Response
object
-
resposne: string
Example:
Conrtaction network is being built.
object
-
resposne: string
Example:
Network is being loaded.
object
-
booleanLinkUserDataColumns: array
booleanLinkUserDataColumns
-
byteLinkUserDataColumns: array
byteLinkUserDataColumns
-
chName: string
Name of generated contraction hierarchy network.
-
costScaleFactors: array
costScaleFactors
-
costUnits: array
costUnits
-
dbUser: string
-
error: string
-
floatLinkUserDataColumns: array
floatLinkUserDataColumns
-
intLinkUserDataColumns: array
intLinkUserDataColumns
-
jndiName: string
-
linkCostColumns: array
linkCostColumns
-
networkName: string
-
networkVersion: string
-
processLinkGeometries: boolean
-
processNodeGeometries: boolean
-
shortLinkUserDataColumns: array
shortLinkUserDataColumns
-
stringLinkUserDataColumns: array
stringLinkUserDataColumns
Examples
The following example shows how to configure contraction hierarchy 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 network or getting meatadata of a contraction 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 hierarchy network.
{"createNetworkRequest": { "chName":"example", "networkName":"NETWORK_NAME","dbUser":"here_sf", "jndiName":"jdbc/here_sf", "processGeometry":true, "linkCostColumns":["LENGTH","LENGTH/S"], "costUnits":["meter","second"], "costScaleFactors":[10, 10], "intLinkUserDataColumns":["S", "F"], "booleanLinkUserDataColumns":["FLOOR((5-F)/3)"], "stringLinkUserDataColumns":["NAME"] }}
The following example shows how to load a contraction hierarchy network.
{"loadNetworkRequest":{"chName":"example"}}
The following example shows how to get the metadata of a contraction hierarchy 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" : "Conrtaction network is being built."}}
The following example shows the contents of the response body in JSON format of load network request.
{"loadNetworkResponse" : {"response" : "Network 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","dbUser" : "here_sf",jndiName" : "jdbc/here_sf","processNodeGeometries" : true,"processLinkGeometries" : true,"linkCostColumns" : ["LENGTH","LENGTH/S"],"costUnits" : ["meter","second"],"costScaleFactors" : [10.0, 10.0], "intLinkUserDataColumns" : ["S", "F"], "booleanLinkUserDataColumns" : ["FLOOR((5-F)/3)"], "stringLinkUserDataColumns" : ["NAME"]}}