noi-techpark / bdp-core

Open Data Hub / Timeseries Core
https://opendatahub.com
Other
9 stars 4 forks source link

Aero CRS API changed and the data collector seems not to work properly #280

Closed sseppi closed 6 months ago

sseppi commented 6 months ago

I and @mrabans making a call to the Aero CRS APIs, discovered that the way they expose the price details has been changed.

You can try by making a request at the following link: https://api.aerocrs.com/v5/getFares

In the previous version of the API the structure of the JSON we got was the following:

{
    "aerocrs": {
        "parms": {
                "start": "2024/01/19",
                "end": "2024/01/19",
                "from": "CRV",
                "to": "FCO"
        }
    }
}

In the new version we get the following JSON:

{
    "aerocrs": {
        "parms": {
            "dates": {
                "start": "2024/01/19",
                "end": "2024/01/19",
            },
            "destinations": {
                "from": "CRV",
                "to": "FCO"
            }
        }
    }
}

We suspect that, due to these changes, the SkyAlps data collector isn't importing the right data anymore.

As for example, the data we are getting in the Web Component we are developing for skyAlps are different than the one showed on the SkyAlps website. We suspect that this problem is due to the fact that the data collector isn't working anymore.

To fix the problem we should:

clezag commented 6 months ago

@sseppi @mrabans I've checked the logs, and I see no errors and regular data pushes. I've also cross-checked a few of the flights on the webcomponent with their website and they match.

Do you have a specific case I can use to track down potential issues?

mrabans commented 6 months ago

@clezag indeed the data is there. I wonder if the change in the API request parameters caused any side effects. Did you check how the request structure looks like?

clezag commented 6 months ago

@mrabans It looks like (line 142) we're using a GET with URL params instead of a JSON POST, maybe that's why it has kept working.

mrabans commented 6 months ago

@clezag alright, so no problems so far. I think we can close the issue @sseppi