Topics:

Cancelled trip times

If you are not yet familiar with GraphQL and GraphiQL it is highly recommended to review those pages at first.

Glossary

Term Explanation
Trip time A specific departure with specific direction for a specific route.
For example: bus 102 leaving from Otaniemi on 2017-11-21 at 10:00.
Feed IDs (feeds) Cancelled trip times are filtered by provided feed feedIds (e.g. ["stpt"]).
Route IDs (routes) Cancelled trip times are filtered by provided route gtfsIds (e.g. ["stpt:r1558"]).
Trip pattern codes (patterns) Cancelled trip times are filtered by provided trip pattern codes (e.g. ["stpt:r1558:1:01"]).
Trip IDs (trips) Cancelled trip times are filtered by provided trip gtfsIds (e.g. ["stpt:1098_20190405_Ma_2_1455"]).
Min date (minDate) Only cancelled trip times scheduled to run on minDate or after are returned. Format: "2019-12-23" or "20191223".
Max date (maxDate) Only cancelled trip times scheduled to run on maxDate or before are returned. Format: "2019-12-23" or "20191223".
Min departure time (minDepartureTime) Only cancelled trip times that have first stop departure time at minDepartureTime or after are returned. Format: seconds since midnight of minDate.
Max departure time (maxDepartureTime) Only cancelled trip times that have first stop departure time at maxDepartureTime or before are returned. Format: seconds since midnight of maxDate.
Min arrival time (minArrivalTime) Only cancelled trip times that have last stop arrival time at minArrivalTime or after are returned. Format: seconds since midnight of minDate.
Max arrival time (maxArrivalTime) Only cancelled trip times that have last stop arrival time at maxArrivalTime or before are returned. Format: seconds since midnight of maxDate.

What are cancelled trip times?

Cancelled trip times are trip times for which the whole departure has been cancelled.

Note: Cancelled trip times do not include a reason why the departure has been cancelled.

Query examples

Note: For more details about the query type alerts you can use the Documentation Explorer provided in GraphiQL.

Query all cancelled trip times for feed stpt

  1. Click this link to run the query below in GraphiQL.
{
  cancelledTripTimes(
    feeds: ["stpt"]
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query all cancelled trip times for route stpt:r1558

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the routes parameter to see proper results.

{
  cancelledTripTimes(
    routes: ["stpt:r1558"]
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query all cancelled trip times for pattern stpt:1098:1:01

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the patterns parameter to see proper results.

{
  cancelledTripTimes(
    patterns: ["HSL:1098:1:01"]
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query all cancelled trip times for trip stpt:1098_20190405_Ma_2_1455

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the trips parameter to see proper results.

{
  cancelledTripTimes(
    trips: ["HSL:1098_20190405_Ma_2_1455"]
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query cancelled trip times for feed HSL on 2019-04-08 and 2019-04-09

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the minDate and maxDate parameters to see proper results.

{
  cancelledTripTimes(
    feeds: ["stpt"]
    minDate: "2019-04-08"
    maxDate: "2019-04-09"
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query cancelled trip times for feed Timisoara between 2019-04-08 14:55 and 2019-04-09 15:06 according to departure time of the first stop

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the minDate, maxDate, minDepartureTime and maxDepartureTime parameters to see proper results.

{
  cancelledTripTimes(
    feeds: ["stpt"]
    minDate: "2019-04-08"
    maxDate: "2019-04-09"
    minDepartureTime: 53700
    maxDepartureTime: 54360
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.

Query cancelled trip times for feed Timisoara between 2019-04-08 14:55 and 2019-04-09 15:06 according to arrival time of the last stop

  1. Click this link to run the query below in GraphiQL.

Note: You may need to change the minDate, maxDate, minArrivalTime and maxArrivalTime parameters to see proper results.

{
  cancelledTripTimes(
    feeds: ["stpt"]
    minDate: "2019-04-08"
    maxDate: "2019-04-09"
    minArrivalTime: 53700
    maxArrivalTime: 54360
  ) {
    scheduledDeparture
    serviceDay
    trip {
      gtfsId
      tripHeadsign
      routeShortName
      directionId
      pattern {
        code
        name
      }
      route {
        gtfsId
        longName
      }
    }
    realtimeState
    headsign
  }
}
  1. Press play in GraphiQL to execute the query.