Why are affectedRoutes
and affectedStops
empty under lineStatuses[].disruption
? I am aware that TrackerNet reports where a disruption starts and ends, so clearly this data exists (or can be worked out), but why is this data not included in the API, given the TrackerNet API is technically deprecated and its use discouraged?
Luckily there’s a partial disruption active right now that can serve as a great example, so here’s the status for the Bakerloo line from both the API (https://api.tfl.gov.uk/Line/bakerloo/Status):
{
"$type": "Tfl.Api.Presentation.Entities.LineStatus, Tfl.Api.Presentation.Entities",
"id": 0,
"lineId": "bakerloo",
"statusSeverity": 3,
"statusSeverityDescription": "Part Suspended",
"reason": "Bakerloo Line: No service between Queen's Park and Harrow & Wealdstone due to a fire alert at Willesden Junction. Tickets valid on local London Buses. ",
"created": "0001-01-01T00:00:00",
"validityPeriods": [
{
"$type": "Tfl.Api.Presentation.Entities.ValidityPeriod, Tfl.Api.Presentation.Entities",
"fromDate": "2021-04-06T14:37:23Z",
"toDate": "2021-04-06T17:37:23Z",
"isNow": true
}
],
"disruption": {
"type": "Tfl.Api.Presentation.Entities.Disruption, Tfl.Api.Presentation.Entities",
"category": "RealTime",
"categoryDescription": "RealTime",
"description": "Bakerloo Line: No service between Queen's Park and Harrow & Wealdstone due to a fire alert at Willesden Junction. Tickets valid on local London Buses. ",
"affectedRoutes": [
],
"affectedStops": [
],
"closureText": "partSuspended"
}
}
And here’s the response from TrackerNet ( cloud.tfl.gov.uk/TrackerNet/LineStatus):
<LineStatus ID="0" StatusDetails="No service between Queen's Park and Harrow & Wealdstone due to a fire alert at Willesden Junction. Tickets valid on local London Buses.">
<BranchDisruptions>
<BranchDisruption>
<StationTo ID="100" Name="Harrow & Wealdstone"/>
<StationFrom ID="183" Name="Queen's Park"/>
<Status ID="PS" CssClass="DisruptedService" Description="Part Suspended" IsActive="true">
<StatusType ID="1" Description="Line"/>
</Status>
</BranchDisruption>
</BranchDisruptions>
<Line ID="1" Name="Bakerloo"/>
<Status ID="PS" CssClass="DisruptedService" Description="Part Suspended" IsActive="true">
<StatusType ID="1" Description="Line"/>
</Status>
</LineStatus>
As you can see, TrackerNet says the disruption starts at Harrow & Wealdstone (<StationTo ID="100" Name="Harrow & Wealdstone"/>
) and ends at Queen’s Park (<StationFrom ID="183" Name="Queen's Park"/>
), but according to the API the disruption doesn’t affect any routes ("affectedRoutes": []
) or stops ("affectedStops": []
).
Is there a reason why these two values always empty? Would be very useful to check what parts of a line are disrupted, especially with something like the London Overground with its huge mess of statuses across several separate lines.