I am trying to capture disruption at line level using the Unified API. The spec states that I can pass a number of modes to /Line/Mode/{modes}/Disruption, or a number of lines to /Line/{ids}/Disruption. In both cases, the entities returned don’t appear to contain any affectedRoutes or affectedStops which makes marrying the Disruption entities up to anything else a little hard! I could call the API once for each line and then map the results one at a time but this is inefficient, slow, and will give the API a workout…
Is this normal behaviour, or a bug? I was expecting to see at least some routes on a line closure, specially on the W&C!
e.g.
REQUEST URL
https://api.tfl.gov.uk/Line/jubilee%2Cwaterloo-city/Disruption
RESPONSE BODY
[
{
"$type": "Tfl.Api.Presentation.Entities.Disruption, Tfl.Api.Presentation.Entities",
"category": "RealTime",
"type": "lineInfo",
"categoryDescription": "RealTime",
"description": "Waterloo and City Line: Service closed ",
"affectedRoutes": [],
"affectedStops": [],
"closureText": "serviceClosed"
},
{
"$type": "Tfl.Api.Presentation.Entities.Disruption, Tfl.Api.Presentation.Entities",
"category": "RealTime",
"type": "lineInfo",
"categoryDescription": "RealTime",
"description": "Jubilee Line: Train service will resume at 06:00 ",
"affectedRoutes": [],
"affectedStops": [],
"closureText": "serviceClosed"
}
]