The resources use a data model that is supported by a set of client-side libraries that are made available on the files and libraries page.
name | path | methods | description |
---|---|---|---|
BikeRental |
|
|
|
ExternalGeocoderResource |
|
|
Maybe the internal geocoder resource should just chain to defined external geocoders? |
GraphInspectorTileResource |
|
|
Slippy map tile API for rendering various graph information for inspection/debugging purpose
(bike safety factor, connectivity...).
One can easily add a new layer by adding the following kind of code to a leaflet map:
var bikesafety = new L.TileLayer( 'http://localhost:8080/otp/routers/default/inspector/tile/bike-safety/{z}/{x}/{y}.png', { maxZoom : 22 }); var map = L.map(...); L.control.layers(null, { "Bike safety": bikesafety }).addTo(map);Tile rendering goes through TileRendererManager which select the appropriate renderer for the given layer. |
IndexAPI |
|
|
|
MunicoderServer |
|
|
|
PlannerResource |
|
|
This is the primary entry point for the trip planning web service. All parameters are passed in the query string. These parameters are defined as fields in the abstract RoutingResource superclass, which also has methods for building routing requests from query parameters. This allows multiple web services to have the same set of query parameters. In order for inheritance to work, the REST resources are request-scoped (constructed at each request) rather than singleton-scoped (a single instance existing for the lifetime of the OTP server). |
Routers |
|
|
This REST API endpoint returns some meta-info about a router. OTP2 does no longer support
remotely loading, reloading, and evicting graphs on a running server (Supported in OTP1).
The HTTP verbs are used as follows: GET - see the registered routerIds(there is just one: default) with the graph. The HTTP request URLs are of the form /otp/routers/{routerId}. The {routerId} is kept to be backward compatible, but the value is ignored. There is only one router, the "default" and that is returned - even if you specify something else. |
ServerInfo |
|
|
|
UpdaterStatusResource |
|
|
Report the status of the graph updaters via a web service. |