Open fabian opened 11 years ago
Why not use parameters? /v1/journeys?tnr={tnr}&cycle={cycle}&puic={puic} Having URL fragments implies a hierarchy of resources, which this doesn't seem to be. Or rather, I don't understand the parameters to say if it is or not. On that note, maybe more obvious parameters make sense...
You're right, there's no hierarchy between the parameters - at least none that I'm aware of. That's the main problem: We have no idea about the meaning of the parameters and I can't see how we could replace them… apart from making additional requests first? But then again it's not really guaranteed to return the specific journey.
/v1/journeys?from=Bern&to=Zürich&datetime=2013-09-17T12:02:00
I'd like to add a resource for getting journey details and propose the following URI design for it:
It's not that nice as it includes external IDs, but this is the only way to get to the data, and connection and stationboard responses include this IDs in
JHandle
: