Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the given serverUrl must already contain "?type=XXX&idCountry=XXX" where the XXX are replaced with the relevant values
    • available types are: raw, instant, daily, month
    • for user FEWS-Bolivia idCountry is:591
  • a relativeViewPeriod must be specified and in the specified id map"general" section
  • the externalLocation must be set to the desired N_IdStation and the externalParameter to the desired N_IdVar in the specified idMap.

The import will take the serverUrl and append it with "&from=year/month/day&to=year/month/day", where the dates are filled using the relativeViewPeriod found in the import configuration file. It will read the D_DataDate and N_Data fields of the resulting json and map these to the correct time series using the N_IdStation and N_IdVar fields.  Running the import in debug mode will print the full url in the log window.

Example Import configuration file:

Code Block
languagexml
<?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>SENAMHI</importType>
        <serverUrl>http://host/api/interop/GetData?type=XXX&amp;idCountry=XXX</serverUrl>
        <relativeViewPeriod unit="hour" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
        <idMapId>IdImportSenamhi</idMapId>
    </general>
    <timeSeriesSet>
       <moduleInstanceId>ImportSenamhi</moduleInstanceId>
       <valueType>scalar</valueType>
       <parameterId>MyPar</parameterId>
       <locationSetId>MyLocSet</locationSetId>
       <timeSeriesType>external historical</timeSeriesType>
       <timeStep unit="nonequidistant"/>
       <readWriteMode>add originals</readWriteMode>
       <synchLevel>1</synchLevel>
    </timeSeriesSet>
</import>
</timeSeriesImportRun>

...