Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Automatically infer the correct URL #216

Open
restuccia opened this issue May 5, 2022 · 2 comments
Open

Automatically infer the correct URL #216

restuccia opened this issue May 5, 2022 · 2 comments

Comments

@restuccia
Copy link

In order to set up the harvester, one has to put the URL of the "root" of the ods portal, for example https://data.iledefrance.fr, and data.gouv.fr looks for the API endpoint by adding /api/datasets/1.0/search/?start=0&rows=50&interopmetas=true right after.

But the main page of ods portails is often on some other URL, such as https://data.iledefrance.fr/pages/home-open-data/ or https://data.economie.gouv.fr/pages/accueil/. If the user tries to paste these URLs in data.gouv.fr, they get an error as data.gouv.fr tries to look for the ods API endpoint in the wrong place, for example https://data.iledefrance.fr/pages/home-open-data/api/datasets/1.0/search/?start=0&rows=50&interopmetas=true

Capture d’écran 2022-05-05 à 10 29 34

A solution could be to try to look for the API endpoint in the right place, i.e. at the root of the domain and not on some sub pages.

@maudetes
Copy link
Contributor

maudetes commented May 9, 2022

I guess the url should be as canonical as possible, or stored as such in udata DB at least.

We could also mention it with example in the guides, or give a feedback to the user in the form.

@restuccia
Copy link
Author

Agree, but maybe a function to clean the url (or return a visible error without the need for the user to click on the previsualisation) could be helpful? The guides are clear, but the form is not helpful IMHO

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

No branches or pull requests

2 participants