Entur Developer
Open
GraphQL

leg

query

Refetch a single transit leg based on its id

Arguments

id·ID!

Return Type

·Leg
id·ID

An identifier for the leg, which can be used to re-fetch transit leg information. The identifier is valid for a maximum of 2 years, but sometimes it will fail after a few hours. We do not recommend storing IDs for a long time.

aimedStartTime·DateTime!

The aimed date and time this leg starts.

expectedStartTime·DateTime!

The expected, real-time adjusted date and time this leg starts.

aimedEndTime·DateTime!

The aimed date and time this leg ends.

expectedEndTime·DateTime!

The expected, real-time adjusted date and time this leg ends.

mode·Mode!

The mode of transport or access (e.g., foot) used when traversing this leg.

transportSubmode·TransportSubmode

The transport sub mode (e.g., localBus or expressBus) used when traversing this leg. Null if leg is not a ride

duration·Long!

The leg's duration in seconds

directDuration·Long!

NOT IMPLEMENTED

The leg's geometry.

authority·Authority

For ride legs, the service authority used for this legs. For non-ride legs, null.

operator·Operator

For ride legs, the operator used for this legs. For non-ride legs, null.

realtime·Boolean!

Whether there is real-time data about this leg

distance·Float!

The distance traveled while traversing the leg in meters.

generalizedCost·Int

Generalized cost or weight of the leg. Used for debugging.

ride·Boolean!

Whether this leg is a ride leg or not.

walkingBike·Boolean

Whether this leg is walking with a bike.

rentedBike·Boolean

Whether this leg is with a rented bike.

fromPlace·Place!

The Place where the leg originates.

toPlace·Place!

The Place where the leg ends.

fromEstimatedCall·EstimatedCall

EstimatedCall for the quay where the leg originates.

toEstimatedCall·EstimatedCall

EstimatedCall for the quay where the leg ends.

line·Line

For ride legs, the line. For non-ride legs, null.

serviceJourney·ServiceJourney

For ride legs, the service journey. For non-ride legs, null.

datedServiceJourney·DatedServiceJourney

The dated service journey used for this leg.

serviceDate·Date

For transit legs, the service date of the trip. For non-transit legs, null.

intermediateQuays·[Quay!]!

For ride legs, intermediate quays between the Place where the leg originates and the Place where the leg ends. For non-ride legs, empty list.

intermediateEstimatedCalls·[EstimatedCall!]!

For ride legs, estimated calls for quays between the Place where the leg originates and the Place where the leg ends. For non-ride legs, empty list.

serviceJourneyEstimatedCalls·[EstimatedCall!]!

For ride legs, all estimated calls for the service journey. For non-ride legs, empty list.

All relevant situations for this leg

Do we continue from a specified via place

interchangeFrom·Interchange
interchangeTo·Interchange
bookingArrangements·BookingArrangement
bikeRentalNetworks·[String!]
elevationProfile·[ElevationProfileStep!]

The leg's elevation profile. All elevation values, including the first one, are in meters above sea level. The elevation is negative for places below sea level. The profile includes both the start and end coordinate.

emission·Emission

The emission per person

previousLegs·[Leg]!(2 args)

Fetch the previous legs, which can be used to replace this leg. The replacement legs do arrive/depart from/to the same stop places. It might be necessary to change other legs in an itinerary in order to be able to ride the returned legs.

nextLegs·[Leg]!(2 args)

Fetch the next legs, which can be used to replace this leg. The replacement legs do arrive/depart from/to the same stop places. It might be necessary to change other legs in an itinerary in order to be able to ride the returned legs.

Did you find what you were looking for?