AssociatedRoutes and AssociatedStops missing from Disruption data

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"
  }
]

Just figured out I might be confusing “Disruption” with “Status”. If I call /Line/Mode/tube/Status I get something that makes a bit more sense.

That said, if I look at bus route 100 right now using /Line/100/Status I get some data back including a Disruption object with no affectedRoutes or affectedStatus. Is it best, in these cases, to get at the data through the Status endpoints to give me a full graph with usual information to parse?

1 Like