Description
The DescribeDatasets service enables user to get information metadata about the datasets corresponding to the routing databases added to the GR SDK server. The response will be analogous with the metadata information present in the dataset path.
This feature is available as REST service only.
HTTP GET URL Format (All Datasets)
http://<server>:<port>/webApp-context/services/v1/datasets.json
HTTP GET URL Format(Single Dataset)
http://<server>:<port>/webApp-context/services/v1/datasets/<dataset_ID>.json
The dataset_ID is the ‘id’ corresponding to the elements in the ‘dataSets’ array from the DescribeDatabases service.
Response
The response of this service is a JSON array.
For all datasets, the length of the JSON array is same as the total number of the dataset paths (with metadata available) added against the databases configured in Management Console. If a dataset path does not have metadata available, that entry will be ignored.
For a single dataset, the length of the JSON array will be one if and only if the metadata is available in the dataset path. Otherwise, an empty JSON array will be returned.
Example
Two routing databases have been added in the GR SDK. The name and dataset paths of the databases are as follows:
- US_NE: E:\\db\\ERM-US\\2014.09\\driving\\northeast
- US: E:\\db\\ERM-US\\2014.09\\driving\\midwest and E:\\db\\ERM-US\\2014.09\\driving\\south
Sample Request (All Datasets):
http://<server>:<port>/webApp-context/services/v1/datasets.json
Response:
{
"dataSets": [{
"component": "routing",
"description": "USA Test dataset",
"ext": {
"bbox": [68.291015625, 7.9721977144, 97.55859375, 35.4606699515],
"crs": "epsg:4326",
"cvr": true,
"historicTrafficTimeBuckets": {
"amPeak": {
"lowerBound": 700,
"upperBound": 1000
},
"nightTime": {
"lowerBound": 2200,
"upperBound": 400
},
"offPeak": {
"lowerBound": 1000,
"upperBound": 1600
},
"pmPeak": {
"lowerBound": 1600,
"upperBound": 1900
}
},
"locale": "EN",
"type": "driving"
},
"id": "US dataset",
"name": "USA",
"product": "Spatial",
"vintage": "September 2015"
}]
}
Sample Request (Single Dataset):
http://<server>:<port>/webApp-context/services/v1/datasets/US%20dataset.json
Response:
{
"dataSets": [{
"component": "routing",
"description": "USA Test dataset",
"ext": {
"bbox": [68.291015625, 7.9721977144, 97.55859375, 35.4606699515],
"crs": "epsg:4326",
"cvr": true,
"historicTrafficTimeBuckets": {
"amPeak": {
"lowerBound": 700,
"upperBound": 1000
},
"nightTime": {
"lowerBound": 2200,
"upperBound": 400
},
"offPeak": {
"lowerBound": 1000,
"upperBound": 1600
},
"pmPeak": {
"lowerBound": 1600,
"upperBound": 1900
}
},
"locale": "EN",
"type": "driving"
},
"id": "US dataset",
"name": "USA",
"product": "Spatial",
"vintage": "September 2015"
}]
}