Skip to main content
POST
List Station Trains

Authorizations

x-arms-api-key
string
header
required
x-arms-assume-user
string
header
required

Headers

Carrier
string
required

Carrier ID

Body

application/json

The stations and time window to list trains for, with forward paging.

The stations and time window to list trains for, with forward paging.

page
object
sources
enum<string>[]

Which kinds of train to list: STATION_TRAIN_SOURCE_TRIP_PLAN (timetable trains from bookings) and STATION_TRAIN_SOURCE_INTERCHANGE_CONSIST (inbound interchange trains). Empty means both; any other value is INVALID_ARGUMENT. A source you lack permission for lists nothing; it is not an error.

Available options:
STATION_TRAIN_SOURCE_UNSPECIFIED,
STATION_TRAIN_SOURCE_TRIP_PLAN,
STATION_TRAIN_SOURCE_INTERCHANGE_CONSIST,
STATION_TRAIN_SOURCE_WORK_ORDER
stationGroupingId
integer<int32>

Deprecated: use stationGroupingIds. Setting both is INVALID_ARGUMENT.

stationGroupingIds
integer<int32>[]

The stations to list trains at: each a station's numeric legacyGroupingId from Get Network Hierarchy. Up to 200 distinct stations; each must be an active station of your carrier that you can see. Unpaged requests take one station.

windowEnd
string<date-time>

End of the window (UTC, exclusive). Unpaged, at most 24 hours after windowStart; paged, at most 31 days.

windowStart
string<date-time>

Start of the window (UTC, inclusive). A train is listed when its time at the station is in [windowStart, windowEnd).

Response

A successful response.

page
object
trains
object[]

Sorted by time, then direction, source, trainId and key, across every requested station.

unavailableSources
enum<string>[]

Unpaged requests only: requested sources that failed and contributed no trains. A paged request whose source fails answers UNAVAILABLE instead; retry the page with the same token.

Available options:
STATION_TRAIN_SOURCE_UNSPECIFIED,
STATION_TRAIN_SOURCE_TRIP_PLAN,
STATION_TRAIN_SOURCE_INTERCHANGE_CONSIST,
STATION_TRAIN_SOURCE_WORK_ORDER