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
Links hierarchy models
In database, links are connected such that each link has one parent, except for the source links. Each link is associated to a technique model. First, we must choose the technique ID to filter the links to be fetched in database.
Endpoint to list the techniques :
>>> from palantir.api import eyeOfSauronAPI
>>> techniques_models = eyeOfSauronAPI.getTechniques()
>>> techniques_models
Get all links by technique ID as a list.
>>> techniqueID = 1
>>> links_models = eyeOfSauronAPI.getLinks(resources={"technique_id":techniqueID}, extra_uri="full")
>>> links_models
Get all links_infos (with modules) by technique ID as a list.
>>> techniqueID = 1
>>> links_models = eyeOfSauronAPI.getLinks(resources={"technique_id":techniqueID, "infos":1}, extra_uri="full")
>>> links_models
Get a link from source to a specific module. To find your desired module, see the Module part
>>> moduleID = 197
>>> links_models = eyeOfSauronAPI.getModules(moduleID, extra_uri="full_path")
Get the full path of an End-To-End loop. To find your desired E2E, see the E2E part
>>> e2eID = 1
>>> links_models = eyeOfSauronAPI.getE2EFreelinks(e2eID, extra_uri="full_path")
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