- Home
- Resources
- IndexAPI
GET /otp/routers/{routerId}/index/feeds
Request Parameters
name |
type |
description |
constraints |
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of string
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/feeds
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/patterns
Request Parameters
name |
type |
description |
constraints |
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiPatternShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"desc" : "...",
"routeId" : "..."
} ]
GET /otp/routers/{routerId}/index/routes
Return a list of all routes in the graph.
Request Parameters
name |
type |
description |
constraints |
multivalued |
detail |
query |
Choose short or long form of results. |
required |
no |
hasStop |
query |
|
|
yes |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
no |
Response Body
media type |
data type |
description |
application/json |
array of ApiRouteShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"shortName" : "...",
"longName" : "...",
"mode" : "...",
"color" : "...",
"agencyName" : "..."
} ]
GET /otp/routers/{routerId}/index/services
List basic information about all service IDs. This is a placeholder endpoint and is not
implemented yet.
Request Parameters
name |
type |
description |
constraints |
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/services
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/stops
Return a list of all stops within a circle around the given coordinate.
Request Parameters
name |
type |
description |
constraints |
detail |
query |
Choose short or long form of results. |
required |
lat |
query |
|
double |
lon |
query |
|
double |
maxLat |
query |
|
double |
maxLon |
query |
|
double |
minLat |
query |
|
double |
minLon |
query |
|
double |
radius |
query |
|
double |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"code" : "...",
"name" : "...",
"lat" : 12345.0,
"lon" : 12345.0,
"url" : "...",
"stationId" : "...",
"dist" : 12345
} ]
GET /otp/routers/{routerId}/index/agencies/{feedId}
Return a list of all agencies in the graph.
Request Parameters
name |
type |
description |
constraints |
feedId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAgency
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/agencies/{feedId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"name" : "...",
"url" : "...",
"timezone" : "...",
"lang" : "...",
"phone" : "...",
"fareUrl" : "...",
"brandingUrl" : "..."
} ]
GET /otp/routers/{routerId}/index/feeds/{feedId}
Request Parameters
name |
type |
description |
constraints |
feedId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiFeedInfo
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/feeds/{feedId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"publisherName" : "...",
"publisherUrl" : "...",
"lang" : "...",
"startDate" : "...",
"endDate" : "...",
"version" : "..."
}
GET /otp/routers/{routerId}/index/patterns/{patternId}
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiPatternShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"desc" : "...",
"routeId" : "..."
}
GET /otp/routers/{routerId}/index/routes/{routeId}
Return specific route in the graph, for the given ID.
Request Parameters
name |
type |
description |
constraints |
routeId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiRoute
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes/{routeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"agency" : {
"id" : "...",
"name" : "...",
"url" : "...",
"timezone" : "...",
"lang" : "...",
"phone" : "...",
"fareUrl" : "...",
"brandingUrl" : "..."
},
"shortName" : "...",
"longName" : "...",
"mode" : "...",
"type" : 12345,
"desc" : "...",
"url" : "...",
"color" : "...",
"textColor" : "...",
"bikesAllowed" : 12345,
"sortOrder" : 12345,
"brandingUrl" : "..."
}
GET /otp/routers/{routerId}/index/services/{serviceId}
List details about a specific service ID including which dates it runs on. Replaces the old
/calendar. This is a placeholder endpoint and is not implemented yet.
Request Parameters
name |
type |
description |
constraints |
serviceId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/services/{serviceId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/stops/{stopId}
Return specific transit stop in the graph, by ID.
Request Parameters
name |
type |
description |
constraints |
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiStop
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"name" : "...",
"lat" : 12345.0,
"lon" : 12345.0,
"code" : "...",
"desc" : "...",
"zoneId" : "...",
"url" : "...",
"locationType" : 12345,
"stationId" : "...",
"wheelchairBoarding" : 12345,
"direction" : "..."
}
GET /otp/routers/{routerId}/index/trips/{tripId}
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiTrip
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"routeId" : "...",
"serviceId" : "...",
"tripShortName" : "...",
"tripHeadsign" : "...",
"routeShortName" : "...",
"directionId" : "...",
"blockId" : "...",
"shapeId" : "...",
"wheelchairAccessible" : 12345,
"bikesAllowed" : 12345,
"fareId" : "..."
}
GET /otp/routers/{routerId}/index/agencies/{feedId}/{agencyId}
Return specific agency in the graph, by ID.
Request Parameters
name |
type |
description |
constraints |
agencyId |
path |
|
|
feedId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
ApiAgency
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/agencies/{feedId}/{agencyId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "...",
"name" : "...",
"url" : "...",
"timezone" : "...",
"lang" : "...",
"phone" : "...",
"fareUrl" : "...",
"brandingUrl" : "..."
}
GET /otp/routers/{routerId}/index/patterns/{patternId}/alerts
Return all alerts for a pattern
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAlert
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}/alerts
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"alertHeaderText" : "...",
"alertDescriptionText" : "...",
"alertUrl" : "...",
"effectiveStartDate" : 12345,
"effectiveEndDate" : 12345
} ]
GET /otp/routers/{routerId}/index/patterns/{patternId}/geometry
Return geometry for the pattern as a packed coordinate sequence
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
EncodedPolylineBean
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}/geometry
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"points" : "...",
"levels" : "...",
"length" : 12345
}
GET /otp/routers/{routerId}/index/patterns/{patternId}/semanticHash
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
string
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}/semanticHash
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/patterns/{patternId}/stops
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}/stops
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"code" : "...",
"name" : "...",
"lat" : 12345.0,
"lon" : 12345.0,
"url" : "...",
"stationId" : "...",
"dist" : 12345
} ]
GET /otp/routers/{routerId}/index/patterns/{patternId}/trips
Request Parameters
name |
type |
description |
constraints |
patternId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiTripShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/patterns/{patternId}/trips
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"tripHeadsign" : "...",
"serviceId" : "...",
"shapeId" : "...",
"direction" : 12345
} ]
GET /otp/routers/{routerId}/index/routes/{routeId}/alerts
Return all alerts for a route
Request Parameters
name |
type |
description |
constraints |
routeId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAlert
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes/{routeId}/alerts
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"alertHeaderText" : "...",
"alertDescriptionText" : "...",
"alertUrl" : "...",
"effectiveStartDate" : 12345,
"effectiveEndDate" : 12345
} ]
GET /otp/routers/{routerId}/index/routes/{routeId}/patterns
Return all stop patterns used by trips on the given route.
Request Parameters
name |
type |
description |
constraints |
routeId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiPatternShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes/{routeId}/patterns
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"desc" : "...",
"routeId" : "..."
} ]
GET /otp/routers/{routerId}/index/routes/{routeId}/stops
Return all stops in any pattern on a given route.
Request Parameters
name |
type |
description |
constraints |
routeId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes/{routeId}/stops
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"code" : "...",
"name" : "...",
"lat" : 12345.0,
"lon" : 12345.0,
"url" : "...",
"stationId" : "...",
"dist" : 12345
} ]
GET /otp/routers/{routerId}/index/routes/{routeId}/trips
Return all trips in any pattern on the given route.
Request Parameters
name |
type |
description |
constraints |
routeId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiTripShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/routes/{routeId}/trips
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"tripHeadsign" : "...",
"serviceId" : "...",
"shapeId" : "...",
"direction" : 12345
} ]
GET /otp/routers/{routerId}/index/stops/{stopId}/alerts
Return all alerts for a stop
Request Parameters
name |
type |
description |
constraints |
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAlert
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/alerts
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"alertHeaderText" : "...",
"alertDescriptionText" : "...",
"alertUrl" : "...",
"effectiveStartDate" : 12345,
"effectiveEndDate" : 12345
} ]
GET /otp/routers/{routerId}/index/stops/{stopId}/patterns
Request Parameters
name |
type |
description |
constraints |
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiPatternShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/patterns
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"desc" : "...",
"routeId" : "..."
} ]
GET /otp/routers/{routerId}/index/stops/{stopId}/routes
Request Parameters
name |
type |
description |
constraints |
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiRouteShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/routes
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"shortName" : "...",
"longName" : "...",
"mode" : "...",
"color" : "...",
"agencyName" : "..."
} ]
GET /otp/routers/{routerId}/index/stops/{stopId}/stoptimes
Return upcoming vehicle arrival/departure times at the given stop.
Request Parameters
name |
type |
description |
default |
constraints |
stopId |
path |
Stop ID in Agency:Stop ID format |
|
|
detail |
query |
Choose short or long form of results. |
|
required |
numberOfDepartures |
query |
Number of departures to fetch per pattern |
2 |
required |
omitNonPickups |
query |
|
|
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
|
required |
startTime |
query |
Start time for the search. Seconds from UNIX epoch |
|
required |
timeRange |
query |
Searches forward for timeRange seconds from startTime |
86400 |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopTimesInPattern
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/stoptimes
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"pattern" : {
"id" : "...",
"desc" : "...",
"routeId" : "..."
},
"times" : [ {
"stopId" : "...",
"stopIndex" : 12345,
"stopCount" : 12345,
"scheduledArrival" : 12345,
"scheduledDeparture" : 12345,
"realtimeArrival" : 12345,
"realtimeDeparture" : 12345,
"arrivalDelay" : 12345,
"departureDelay" : 12345,
"timepoint" : true,
"realtime" : true,
"realtimeState" : "CANCELED",
"serviceDay" : 12345,
"tripId" : "...",
"blockId" : "...",
"headsign" : "..."
}, {
"stopId" : "...",
"stopIndex" : 12345,
"stopCount" : 12345,
"scheduledArrival" : 12345,
"scheduledDeparture" : 12345,
"realtimeArrival" : 12345,
"realtimeDeparture" : 12345,
"arrivalDelay" : 12345,
"departureDelay" : 12345,
"timepoint" : true,
"realtime" : true,
"realtimeState" : "MODIFIED",
"serviceDay" : 12345,
"tripId" : "...",
"blockId" : "...",
"headsign" : "..."
} ]
} ]
GET /otp/routers/{routerId}/index/stops/{stopId}/transfers
Return the generated transfers a stop in the graph, by stop ID
Request Parameters
name |
type |
description |
constraints |
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiTransfer
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/transfers
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"toStopId" : "...",
"distance" : 12345.0
} ]
GET /otp/routers/{routerId}/index/trips/{tripId}/alerts
Return all alerts for a trip
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAlert
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}/alerts
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"alertHeaderText" : "...",
"alertDescriptionText" : "...",
"alertUrl" : "...",
"effectiveStartDate" : 12345,
"effectiveEndDate" : 12345
} ]
GET /otp/routers/{routerId}/index/trips/{tripId}/geometry
Return geometry for the trip as a packed coordinate sequence
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
EncodedPolylineBean
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}/geometry
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"points" : "...",
"levels" : "...",
"length" : 12345
}
GET /otp/routers/{routerId}/index/trips/{tripId}/semanticHash
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
string
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}/semanticHash
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/trips/{tripId}/stops
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}/stops
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"id" : "...",
"code" : "...",
"name" : "...",
"lat" : 12345.0,
"lon" : 12345.0,
"url" : "...",
"stationId" : "...",
"dist" : 12345
} ]
GET /otp/routers/{routerId}/index/trips/{tripId}/stoptimes
Request Parameters
name |
type |
description |
constraints |
tripId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of TripTimeShort
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/trips/{tripId}/stoptimes
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"stopId" : {
"feedId" : "...",
"id" : "..."
},
"stopIndex" : 12345,
"stopCount" : 12345,
"scheduledArrival" : 12345,
"scheduledDeparture" : 12345,
"realtimeArrival" : 12345,
"realtimeDeparture" : 12345,
"arrivalDelay" : 12345,
"departureDelay" : 12345,
"timepoint" : true,
"realtime" : true,
"realtimeState" : "MODIFIED",
"serviceDay" : 12345,
"tripId" : {
"feedId" : "...",
"id" : "..."
},
"blockId" : "...",
"headsign" : "...",
"pickupType" : 12345,
"dropoffType" : 12345
} ]
GET /otp/routers/{routerId}/index/agencies/{feedId}/{agencyId}/alerts
Return all alerts for an agency
Request Parameters
name |
type |
description |
constraints |
agencyId |
path |
|
|
feedId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiAlert
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/agencies/{feedId}/{agencyId}/alerts
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"alertHeaderText" : "...",
"alertDescriptionText" : "...",
"alertUrl" : "...",
"effectiveStartDate" : 12345,
"effectiveEndDate" : 12345
} ]
GET /otp/routers/{routerId}/index/agencies/{feedId}/{agencyId}/routes
Return all routes for the specific agency.
Request Parameters
name |
type |
description |
constraints |
agencyId |
path |
|
|
feedId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/agencies/{feedId}/{agencyId}/routes
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /otp/routers/{routerId}/index/stops/{stopId}/stoptimes/{date}
Return upcoming vehicle arrival/departure times at the given stop.
Request Parameters
name |
type |
description |
constraints |
date |
path |
in YYYYMMDD or YYYY-MM-DD format |
|
stopId |
path |
|
|
detail |
query |
Choose short or long form of results. |
required |
omitNonPickups |
query |
|
required |
refs |
query |
Include GTFS entities referenced by ID in the result. |
required |
Response Body
media type |
data type |
description |
application/json |
array of ApiStopTimesInPattern
(JSON) |
|
Example
Request
GET /routers/{routerId}/index/stops/{stopId}/stoptimes/{date}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"pattern" : {
"id" : "...",
"desc" : "...",
"routeId" : "..."
},
"times" : [ {
"stopId" : "...",
"stopIndex" : 12345,
"stopCount" : 12345,
"scheduledArrival" : 12345,
"scheduledDeparture" : 12345,
"realtimeArrival" : 12345,
"realtimeDeparture" : 12345,
"arrivalDelay" : 12345,
"departureDelay" : 12345,
"timepoint" : true,
"realtime" : true,
"realtimeState" : "CANCELED",
"serviceDay" : 12345,
"tripId" : "...",
"blockId" : "...",
"headsign" : "..."
}, {
"stopId" : "...",
"stopIndex" : 12345,
"stopCount" : 12345,
"scheduledArrival" : 12345,
"scheduledDeparture" : 12345,
"realtimeArrival" : 12345,
"realtimeDeparture" : 12345,
"arrivalDelay" : 12345,
"departureDelay" : 12345,
"timepoint" : true,
"realtime" : true,
"realtimeState" : "SCHEDULED",
"serviceDay" : 12345,
"tripId" : "...",
"blockId" : "...",
"headsign" : "..."
} ]
} ]