Post a configuration of a contraction hierarchy

post

https://localhost:7011/chrest/v1/configuration

By passing in the Network Configuration Request in json, you can configure contraction hierarchy networks.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
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
Nested Schema : booleanLinkUserDataColumns
Type: array
Show Source
Nested Schema : byteLinkUserDataColumns
Type: array
Show Source
Nested Schema : costColumns
Type: array
Show Source
Nested Schema : costScaleFactors
Type: array
Show Source
Nested Schema : costUnits
Type: array
Show Source
Nested Schema : floatLinkUserDataColumns
Type: array
Show Source
Nested Schema : intLinkUserDataColumns
Type: array
Show Source
Nested Schema : shortLinkUserDataColumns
Type: array
Show Source
Nested Schema : stringLinkUserDataColumns
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 : booleanLinkUserDataColumns
Type: array
Show Source
Nested Schema : byteLinkUserDataColumns
Type: array
Show Source
Nested Schema : costScaleFactors
Type: array
Show Source
Nested Schema : costUnits
Type: array
Show Source
Nested Schema : floatLinkUserDataColumns
Type: array
Show Source
Nested Schema : intLinkUserDataColumns
Type: array
Show Source
Nested Schema : linkCostColumns
Type: array
Show Source
Nested Schema : shortLinkUserDataColumns
Type: array
Show Source
Nested Schema : stringLinkUserDataColumns
Type: array
Show Source
Back to Top

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