Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update route error #2861

Open
tcollard opened this issue Jul 11, 2019 · 5 comments
Open

Update route error #2861

tcollard opened this issue Jul 11, 2019 · 5 comments
Labels

Comments

@tcollard
Copy link

Hi,
I try to update a route, so I keep stop_area id and route.id, and it works.
But if I retry after few days, there is an 404 error. (unable to find object)
I don't know if the stop_area id can change or I do a wrong request.

For instance, this request used to work few week ago.
https://api.navitia.io/v1/coverage/2.131622;48.803564/stop_areas/stop_area:OIF:SA:2:239/routes/route:OIF:056356005:G/stop_schedules?from_datetime=20190708T185944&items_per_schedule=2&

If someone has any ideas, thx.

@kinnou02
Copy link
Contributor

kinnou02 commented Jul 31, 2019

Hi,
id of objects can change if the data provider change the id in their database, there is currently no process in place to build stable id on navitia.io.
also, data integration isn't handled by navitia itself.

from the id you are using it looks like your request is on fr-idf: all ids have been updated as we did change the source of data for this coverage since https://api.navitia.io/v1/coverage/fr-idf/ is used to provide the official "openservice" of Ile de France Mobilité
This change allows us to provide disruptions and later realtime data.

@clemishow
Copy link

Is there any way to save a route? @kinnou02

@pbougue
Copy link
Contributor

pbougue commented Aug 12, 2019

Unfortunately, I see no guaranteed way to save a PublicTransport object.

But those are highly dependent on data changes, it's only fallback that could help, but not always.

@clemishow
Copy link

Any news about this?

@pbougue
Copy link
Contributor

pbougue commented Aug 2, 2021

Hello,
AFAIK, there is no plan on guaranteeing ID stability from one dataset to the other.
ID stability is a quite complicated problem, transitland tried to address that if I remember correctly, but not Navitia.
There is a little word in doc on that (see Lifetime of id: https://doc.navitia.io/#objects-order)

So as for any Public-Transport object in Navitia, ID is not stable over datasets (although data producers are encouraged to make stable choices, like in GTFS specifications).
If one really wants to offer stability of bookmarks, I would suggest keeping not only the ID but other information about the object (like name, position for stop) and then dig into autocompletion services or /places_nearby to try to recover if ID changes, but this would still not be a silver bullet.
But to my knowledge there is no plan to offer stability on IDs when data changes in navitia, ever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants