GetCapabilities
Description
The GetCapabilities service enables user to retrieve the metadata about the deployed routing engine. The user can use the metadata to explore a service and its capabilities, therefore optimizing their experience using the routing services.
This is available as REST service only.
HTTP GET URL Format
The following format is used for HTTP GET requests.
http://<server>:<port>/rest/Spatial/erm/v1/capabilities.json
Query Parameters
The table describes the query parameters for GetCapabilities.
Parameter | Required | Description |
---|---|---|
acceptVersions | Optional | Specifies a placeholder (not functional) |
sections | Optional When omitted, returns information about all sections. |
Specifies a comma-separated unordered list of zero or more names of
sections of service metadata document to be returned in the service
metadata document. Section values are case-insensitive. Accepted
section values are:
|
Response
The response will be in line with OGC GetCapabilities. It is in JSON format and has these sections:
- serviceIdentification
- serviceProvider
- operationsMetadata
- databases
serviceIdentification
This section contains basic metadata about this specific server. Its content look like:
"serviceIdentification":
{
"title": "PBS Routing Service",
"abstract": "Routing service maintained by PBS",
"keywords":
{
"keyword":
[
]
},
"serviceType": "Routing",
"serviceTypeVersion": "v1",
"fees": "none",
"accessConstraints": "none"
}
This information will be the same as what is available in the getCapabilities.json configuration file.
This file is available at SpectrumDirectory\server\modules\routing. The server restart is required for any changes to be effective. The administrator can allow what information the user is allowed to view, modify, or delete in the corresponding entries in the JSON file. All fields in the JSON file are optional.
serviceProvider
This section contains metadata about the organization operating this server. Its content look like:
"serviceProvider":
{
"providerName": "Routing Service Provider",
"providerSite":
{
"href": "http://www.yourcompany.com/",
"type": "simple"
},
"serviceContact":
{
"contactInfo":
{
"address":
{
"administrativeArea": "Province",
"city": "City",
"country": "Country",
"deliveryPoint": "Mail Delivery Location",
"electronicMailaddress":"mailto://support@yourcompany.com",
"postalCode": "PostCode"
},
"contactInstructions": "Contact Instructions",
"hoursOfservice": "24 Hours",
"phone":
{
"facsimile": "1.800.000.0000",
"voice": "1.800.000.0000"
}
},
"individualName": "Contact Person",
"positionName": "Contact Person's Title",
"role": "Contact Person's Role"
}
}
This will also be configured using the getCapabilities.json configuration file as described above.
operationsMetadataThis section contains metadata about the operations implemented by this server, including the URLs for operation requests. These fixed operations or services are listed in this section:
- GetRoute: point to point service
- GetRouteCostMatrix: matrix of points processing service
- GetTravelBoundary : generates a drive or walk time or distance boundary
- DescribeDatasets: gives information about the datasets configured
- DescribeDatabases: gives information about all the databases configured
- GetSegmentDataForPoint: returns segment information for a point
- GetSegmentDataForSegment: returns segment information for a segment ID
- ListPersistentUpdates: lists down all the persistent updates that exists in the server
- DeletePersistentUpdates: deletes all the persistent updates that exists in the server
- SetPersistentUpdatesAtPoint: saves persistent update for the specified point in the server
- SetPersistentUpdatesForSegment: saves persistent update for the specified segment ID in the server
- SetPersistentUpdatesForRoadType: saves persistent update for the specified road type in the server
Its content look like:
{"operationsMetadata": [{
"name": "GetRoute",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=route&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=route&version=2"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetRouteCostMatrix",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=routeCostMatrix&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=routeCostMatrix&version=2"
}
},"parameter": {
"name": "OutputFormat",
"value": "text/json"}
},
{
"name": "GetTravelBoundary",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=travelBoundary&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=travelBoundary&version=2"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DescribeDatasets",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/v1/datasets.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DescribeDatabases",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/v1/databases.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetSegmentDataForPoint",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/segments.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetSegmentDataForSegment",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/segments/<segmentID>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "ListPersistentUpdates",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DeletePersistentUpdates",
"DCP": {
"HTTP": {
"DELETE": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesAtPoint",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates.jason"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesForSegment",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates/segments/<segmentID>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesForRoadType",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates/roadTypes/<roadtype>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
}
]
}
databases
This section will contain the list of names of databases which are configured in the server.
For example:
{
"databases":
[
"US_NE",
"US"
]}
If no database is configured on the server, this is returned:
{
"databases":[
]
}