In order to activate the Vigicrues Web import as a FEWS import, it is required to set up a TimeSeriesImportRun module configuration file and an accompanying IdMap file. To make the certificate of the Vigicrues Web-API known to FEWS, a so called client.truststore is required. Since FEWS 2017.02 it is reccomended to configure the truststore in the clientConfig.xml. For instruction see: How to configure secure https connection to Matroos.

The root certificate in the certification path of the url must be present in the truststore. At the time of writing, this is "Certigna" and a truststore including (only) this certificate can be found here. For instructions on how to create a new truststore containing the certificate or add the certificate to an existing truststore, see: Import data using OPeNDAP.

The import will take the serverUrl and append it with "?CdStationHydro=<externalLocationId>&GrdSerie=<externalParameterId>", for each combination of <externalLocationId> and <externalParameterId> found in the IdMap file. Running the import in debug mode will print the full url(s) in the log window. The data in the XML-file obtained from the url(s) will be imported using the Vigicrues Xml import, so please refer to that wiki for more information on how the XML is read.

Example Import configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
<!-- This is an example import configuration file for importing Observations and Measurements data from a service -->
<import>
    <general>
		<importType>Vigicrues_web</importType>
		<serverUrl>https://www.vigicrues.gouv.fr/services/observations.xml/</serverUrl>
		<idMapId>IdImportVigicruesWeb</idMapId>
	</general>
    <timeSeriesSet>
       <moduleInstanceId>ImportVigicrues</moduleInstanceId>
       <valueType>scalar</valueType>
       <parameterId>Q.obs</parameterId>
       <locationSetId>VigicruesSet</locationSetId>
       <timeSeriesType>external historical</timeSeriesType>
       <timeStep unit="hour" multiplier="1"/>
       <readWriteMode>add originals</readWriteMode>
    </timeSeriesSet>
</import>
</timeSeriesImportRun>

Example IdMap file:

<?xml version="1.0" encoding="UTF-8"?>
<idMap version="1.1" xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/idMap.xsd">
 <!--
    map internal timeseries directly to external timeseries
    externalLocation should be set to CdStationHydro
    externalParameter should be set to GrdSerie
 -->
 
<map internalLocation="Vigicrues_web_1" internalParameter="Q.obs" externalLocation="L800001020" externalParameter="Q" />
<map internalLocation="Vigicrues_web_2" internalParameter="Q.obs" externalLocation="B463101001" externalParameter="Q" />
 
</idMap>