Data Inconsistency on the OCM API

Hi,

I have a problem with the OCM API. I will give you an exemple:

When I make this API request (https://api.openchargemap.io/v3/poi/?chargepointid=154812) some times the requests returns no results and some times returns a result. When reloading the page multiple times, some times it keeps returning a result and some times it just don’t.

Looking at the response headers when no result is returned, the x-forwareded-host is api-01.openchargemap.io and when a result is indeed returned the x-forwarded-host is api-mirror-02.openchargemap.io.

On top of that, if you look for the details page of OCM for that specific charge point: https://openchargemap.org/site/poi/details/154812 and compare it with the request to the API that returns one result (x-forwarded-host=api-mirror-02.openchargemap.io) the information doesn’t match.

In the OCM detail page says that the SubmissionStatus is “Delisted - Duplicated” but in the API request with result says that the SubmissionStatus is “Submission Published”.

It seems like some kind of outdated cache responding with outdated data.

I have also checked with other requests, like getting all the charge points by country code, and it happens the same. The information beetween x-forwareded-host=api-01.openchargemap.io and x-forwarded-host=api-mirror-02.openchargemap.io doesn’t match, you can check it with Spain for example.

What should we do to get the correct information?

Thank you. Kind regards.

Thanks for pointing this out! In order to load balance API reada our API has a new mirror system in place that attempts to sync with the master (api-01.openchargemap.io), this becomes part of the read only responses for api.openchargemap.io.

The mirror should be synced at most every 5 minutes. I’ll investigate if something is causing delisted items to not be synced properly to the mirror API.

The API mirror has now been fully refreshed and matches the master API. Work to guarantee consistency between API reads is ongoing.