How can I remove contact from specific stations?

How can I remove contact from specific stations?

VidmarVesna -
回帖数:7

Hi,
we are currently preparing API code to upgrade OSCAR DB with data for Slovenian stations.

We have a problem, one of our colleagues is automatically added as a contact, but college is responsible for stations with GAWS program & has no part with GOS program.

I have 2 questions:

1.) Can code that was written by Timo be reversed?
https://github.com/kurt-hectic/wmo-api-webinar/blob/master/Exmple%20%235%20(adding%20contacts%20with%20batch%20script).ipynb

So that we can make a list of stations that are not in GAWS and remove our college from these stations?

2.) Is there a better way to remove contacts from stations?

Thank you for sharing your experiences & reply,

Best regards,

Vesna

回复VidmarVesna

Re: How can I remove contact from specific stations?

ProescholdtTimo -

Dear Vesna,

unfortunately there is no way to remove contacts (and other elements) through the API, due to the way it is designed. Typically elements, such as observations, are "deactivated", by setting an end date, but this does not work with contacts. We recognize this as a shortcoming which may be addressed in a future release.

If you define who should be added/removed at which stations we may be able to do a bulk SQL change.

with kind regards,
Timo

回复ProescholdtTimo

Re: How can I remove contact from specific stations?

VidmarVesna -
Dear Timo,

thank you for your reply. We will kindly ask you if you will do for Slovenian stations, after we upload all of our stations into operational OSCAR.

Warm regards,

Vesna
回复ProescholdtTimo

Re: How can I remove contact from specific stations?

SEHBAJRAKTAREVICKemal -
Hi Timo
At OSCAR/surface -- management tab --- I have few contacts at one station (I set only one). When I go to edit tab, trying to remove this wrong info, I see only me as a contact?
How to remove the wrong contact?
回复SEHBAJRAKTAREVICKemal

Re: How can I remove contact from specific stations?

ProescholdtTimo -

Hi Kemal,

the other contacts may be there because of their role (national focal point or similar).

We may add contact management functions to the client in the next version, but I am not sure this would help here, as contacts with certain roles are always shown, no matter the metadata.

with kind regards,

Timo

回复ProescholdtTimo

Re: How can I remove contact from specific stations?

SEHBAJRAKTAREVICKemal -
Shouldn't the NFP for OSCAR have an option to remove someone who is retired, or passed away?
回复SEHBAJRAKTAREVICKemal

Re: How can I remove contact from specific stations?

ProescholdtTimo -

Hi Kemal,

of course you can remove contacts. If its a regular contact, you can remove them via the GUI, if its a NFP then it is through sending WMO an updated nomination of a new NFP, then that contact is removed.

The issue discussed previously was that a regular contact cannot be removed via the API, due to how it is designed.

Does that explain the issue?
Timo