Beta: Trip Status v2 web service
Base HTTP URL: http://developer.trimet.org/ws/v2/tripStatus
Base HTTPS URL: https://developer.trimet.org/ws/v2/tripStatus
Service returns the status of currently operating trips.
Request parameters:
Name | Value | Description |
---|---|---|
appID | string (required) | Your appID received during registration. |
tripIDs | comma delimited list of tripIDs(optional) | Trips to retrieve status for. |
blockIDs | comma delimited list of blockIDs (optional) | Blocks to retrieve trips status for. Any trip relevant to that block will be inlcuded. |
showRoutes | boolean value "true" (default) or "false" | If true route elements will be included in the resultSet. These are the same as is provided in the routeConfig service, and the same parameters are accepted, except for routeIds. Note that some routes will not be present such as dead head routes such as those that are out of service heading to or from a garage or rail yard. |
showStops | boolean value "true" (default) or "false" | If true location elements will be included in the resultSet. |
json | boolean value "true" (default) or "false" | If true results will be in json format. If false results will be returned in xml format.. |
Response fields:
Note: all times values are in Unix time format, milliseconds since epoch.
Name | Description |
---|---|
resultSet | Root element of all results |
resultSet[@queryTime] | Time the result was generated. |
errorMessage | This element will occur if there was an error processing your request and contains a description of the problem. |
trip | Contains information about the status of a trip. |
trip[@tripID] | Trip's ID. If extraTrip is false will match current GTFS schedule. |
trip[@blockID] | Block's ID that is to perform this trip. |
trip[@routeNumber] | Route Number the trip is serving. |
trip[@distance] | Total distance in feet of this trip. |
trip[@progressFeet] | How many feet have been served on this trip. May be null if no data is yet available for the trip, such as when no vehicle is serving the trip yet, or data from a vehicle serving the trip is unavailable. |
trip[@pattern] | The pattern number for the trip. |
trip[@destination] | Description of trips destination |
trip[@blocksSchedulePosition] | Integer value of the position of the block (if available) in the service day, as measured in seconds since 12am. |
trip[@extraTrip] | Boolean value if this trip is extra service that's not found in the GTFS schedule. |
trip[@tripBeginTime] | Time the trip is scheduled to begin. |
trip[@tripEndTime] | Time the trip is scheduled to end. |
trip[@scheduleDay] | Time at beginning of service day. |
trip[@modified] | Boolean value indicates if this trip has been changed, such as having canceled stops. |
trip[@direction] | Direction of the route the trip is for. |
stop | Child element of trip elements. Each is a stop along the trip. Some stops may not be included in the GTFS schedule, such as non-accessible stops or additional temporary stops on modified trips. |
stop[@locid] | Integer location ID of the stop. |
stop[@stopSequence] | Integer stop sequence along the trip. |
stop[@isPassed] | boolean value indicating if the vehicle has passed the stop, or if no vehicle position is available if the current time has passed the departure time of the stop. |
stop[@passengerAccessible] | boolean value indicates if passengers can access this stop. |
stop[@distance] | Floating point value indicating the feet this stop is along the trip. |
stop[@aimedArrival] | Scheduled arrival time at the stop. |
stop[@aimedDeparture] | Scheduled departure time from the stop. |
stop[@arrivalDelay] | Optional integer value of the number of seconds the vehicle is currently lagging (positive) or leading (negative) its schedule adherence for arrival at the stop. If no vehicle position is known this attribute will be absent. |
stop[@departureDelay] | Optional integer value of the number of seconds the vehicle is currently lagging (positive) or leading (negative) its schedule adherence for departure from the stop. If no vehicle position is known this attribute will be absent. |
stop[@estimated] | Optional boolean value indicating if the stop can be estimated based on a vehicle position. If no vehicle position is known this attribute will be absent. |
stop[@adjustedArrival] | Optional time the vehicle is expected to arrive at stop given its current position. If no vehicle position is known this attribute will be absent. |
stop[@adjustedDeparture] | Optional time the vehicle is expected to depart the stop given its current position. If no vehicle position is known this attribute will be absent. |
stop[@status] | String value indicating the status of this stop for the trip. Current possible values are: "normal" - Stop is expected to be served as usual. "canceled" - Stop has been canceled for this trip. "dropOffOnly" - Vehicle is expected to arrive at stop but is not picking up passengers. |
route | Contains information about a route, documented on the routeConfig page. |
location | Contains information about a stop |
location[@desc] | The public location description of the stop. |
location[@dir] | The direction of traffic at the stop. The cardinal directions of a compass. For bidirectional rail platforms the value will be blank. |
location[@lat] | The latitude of the stop. |
location[@lng] | The longitude of the stop. |
location[@locid] | LocationID of the stop. |
location[@passengerCode] | Passenger access code for the stop. 'E' = Either boarding or alighting 'A' = Alighting only 'B' = Boarding only 'N' = Neither boarding nor alighting |