Hi all,
I've finally had the chance to get to grips with the new Lift and Escalator API, I'll try to
summarise my observations. I'll start with the problems.
1. You need to email someone to sign up. Not the end of the world, but definitely higher
friction than many of the self-service APIs. The explanation for this (and other shortcomings)
appears to be that they intend to eventually offer it through the Rail Data Marketplace.
2. The initial information was extremely lacking. All you really had to go on were the two
documents you received if you were subscribed to the old API, which told you nothing about
endpoints or authentication. Peter had to go digging to work out the fundamentals, and I was
only informed of the URL for the public-facing API documentation earlier today.
The communication about the new API suggested that the documentation would be available via
Anypoint, with credentials available on request. When I requested it, I was told that it was
Network Rail internal only, but after some back-and-forth, was given - for the first time -
a link to the public documentation, a day before the old API is due to be closed down.
3. The mandatory protocol is extremely obtuse, it's effectively a requirement that you model
your interface around the interface of National Rail's access map, whether or not that's
appropriate. Some of its requirements are challenging - if not impossible - to comply with,
and some of the requirements are wrong; for example, you are obliged to say that the lifts
in Warwick Parkway, a station closer to Birmingham than London, are managed by TfL, or that
no live information is available in cases where this is untrue. I've expressed my concerns to
Network Rail, who say that the protocol may be revisited in future, with no commitment.
4. The contact at Network Rail who I was discussing this issue with requested that I edit
the article on the new API to remove the example API keys. I wasn't responsible for adding
these, but I mentioned briefly in my introduction that I was a contributor to the wiki. They
have acknowledged that the credentials are fictional, but nevertheless justified their request by
pointing to the first line in the terms and conditions:
"The credentials received are to be used solely by the person initiating the request unless
otherwise made clear during the request review process that the request is on the behalf of
another person or organization."
Since the credentials are entirely fictional, and generated randomly by Peter, not derived from
actual credentials, they are not "the credentials received".
To add insult to injury, the public documentation itself features example credentials. We've
changed the examples in the wiki to mirror those, I'm unsure yet whether this will be enough to
satisfy them.
I don't like feeling that I'm under pressure to make community documentation worse to accommodate
Network Rail's whims. They've bungled more than enough in their own communication/documentation
without insisting we join in.
My thanks to Peter for his guidance dealing with this.
Here's the diff:
https://wiki.openraildata.com/index.php?title=Stations_Experience_API&diff=3360&oldid=3359
5. There's some odd mistakes in the data. Network Rail has five regions, but in the stations
experience API, it has six. The sixth is - apparently - someone's name (which I'll omit for
their sake). I've not looked closely enough to know if there's other mistakes, but mistakes
like this make me nervous. The person in question at least doesn't have any lifts or escalators.
6. The API design feels a bit odd in places. It's light years ahead of CrossTech, but /stations
isn't a list of stations, you can only query individual lifts with respect to the location
it's part of (this is admittedly a nitpicky thing but it feels odd semantically), and there's
not a straightforward way to get a stripped down summary of lift status across all locations.
6. It's all REST, not a bit of GraphQL in sight. That was one of the most exciting things about
the new API for me, I quite disliked graphQL, and I disliked how opaque the API could be.
7. All of the endpoints work! Not a very high bar to clear, but that's where CrossTech set it.
8. You can now tell when a lift/escalator's status was last updated. You arguably aren't allowed
to do anything with this information, since you're obliged to only use the specified symbols
and text, but in theory this is nice to have.
If I were to summarise, I think that from a technological point of view, the new API is a leap
forward, but everything around it is a step back. I'm not currently willing to use the data in
anything public-facing - the restrictions are too onerous, and my feeling after the wiki debacle
is that enforcement is likely to be capricious and arbitrary.
Evelyn