Retrieving Data from other systems

This section is intended as a guide to easily fetch data from Information Systems related to REFIMEVE purposes.

EyeOfSauron Web Services

EyeOfSauron offers a variety of endpoints to access REFIMEVE subsystems’ metadata, which can be fetched using functions from the palantir.api.EyeOfSauronAPI class.

End-to-End models

Get the list of all End-to-End database rows.

>>> from palantir.api import eyeOfSauronAPI

>>> e2eModels = eyeOfSauronAPI.getE2EFreelinks()

>>> for model in e2eModels:
>>>     print(model["id"], model["label"])

Find a specific row by id.

>>> from palantir.api import eyeOfSauronAPI

>>> SL_model = eyeOfSauronAPI.getE2EFreelinks(uid=1)
>>> SL_model

Two-Way models

Get the list of all Two-Way database rows.

>>> from palantir.api import eyeOfSauronAPI

>>> twModels = eyeOfSauronAPI.getTwoWays()

>>> for model in twModels:
>>>     print(model["id"], model["label"])

Find a specific row by id.

>>> from palantir.api import eyeOfSauronAPI

>>> LPL_NPL_model = eyeOfSauronAPI.getTwoWays(uid=6)
>>> LPL_NPL_model

Modules models

Get the list of Module database rows by node ID.

>>> from palantir.api import eyeOfSauronAPI

>>> th2_ID = 3
>>> th2_modules = eyeOfSauronAPI.getModules(resources={'node_id': th2_ID})

>>> for model in th2_modules:
>>>     print(model["id"], model["label"])

Get the list of Module database rows by type. Find the list of available types in palantir.settings.MODULE_TYPES constant.

>>> from palantir.api import eyeOfSauronAPI

>>> module_type = "station"
>>> stations = eyeOfSauronAPI.getModules(resources={'type': module_type})

>>> for model in stations:
>>>     print(model["id"], model["label"])

Find a specific row by id.

>>> from palantir.api import eyeOfSauronAPI

>>> M00_model = eyeOfSauronAPI.getModules(uid=12)
>>> M00_model

Sources Modules models

Get the list of sources in a specific infrastructure

>>> from palantir.api import eyeOfSauronAPI

>>> sources_models = eyeOfSauronAPI.getInfrastructures(self.id, extra_uri="sources")
>>> sources_models

Measuring Instrument models

Get the list of Measuring Instrument database rows by node ID.

>>> from palantir.api import eyeOfSauronAPI

>>> th2_ID = 3
>>> th2_instruments = eyeOfSauronAPI.getMeasuringInstruments(resources={'node_id': th2_ID})

>>> for model in th2_instruments:
>>>     print(model["id"], model["label"])

Get the list of Measuring Instrument database rows by type. Find the list of available types in palantir.settings.INSTRUMENT_TYPES constant.

>>> from palantir.api import eyeOfSauronAPI

>>> instrument_type = "counter"
>>> counters = eyeOfSauronAPI.getMeasuringInstruments(resources={'type': instrument_type})

>>> for model in counters:
>>>     print(model["id"], model["label"])

Find a specific row by id.

>>> from palantir.api import eyeOfSauronAPI

>>> KK13_model = eyeOfSauronAPI.getMeasuringInstruments(uid=1)
>>> KK13_model

Clock comparison models

List of campaigns or specific campaign

>>> from palantir.api import eyeOfSauronAPI

>>> campaign_models = eyeOfSauronAPI.getCampaigns()
>>> campaign_models
>>> from palantir.api import eyeOfSauronAPI

>>> ROCIT_ID = 1
>>> rocit_model = eyeOfSauronAPI.getCampaigns(ROCIT_ID)
>>> rocit_model

Get chains of comparators between two modules

>>> from palantir.api import eyeOfSauronAPI

>>> ROCIT_ID = 1
>>> moduleA_ID = 83
>>> moduleB_ID = 68

>>> chains = eyeOfSauronAPI.getCampaigns(ROCIT_ID, resources={"module_a": moduleA_ID, "module_b": moduleB_ID}, extra_uri="chains")

Get all modules involved in a campaign

>>> from palantir.api import eyeOfSauronAPI

>>> ROCIT_ID = 1
>>> modules = eyeOfSauronAPI.getCampaigns(ROCIT_ID, extra_uri="modules")
>>> modules

Optique1 Web Services

Optique1 (Exail as of July 2024) offers a variety of endpoints to access REFIMEVE stations data and metadata. Please use palantir.api.Optique1API.

BIPM Web Services

BIPM offers a variety of endpoints to access frequency standards, timescales…. Please use palantir.api.BipmAPI