Versions Compared

Key

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

...

The Meteo-France API portal allows access by a user name and password. The credentials are linked to an APPLICATION_ID, which is needed to generate access tokens by the importer by the following way: after login Meteo-France API portal, make sure that you have subscribed to one or more datasets. Then click on the user account in connected mode (top right) > 'My API', which will list the datasets that you subscribed, as shown in Figure 1.

Figure 1: dataset that one has subscribed under his/her account.

Then choose a dataset and click button 'Generate Token'. Token will be displayed as shown in Figure 2.

Figure 2: an example of the tokens generated.

The APPLICATION_ID can be found in the cURL curl command at the bottom of Figure 2, as see seen below, where after word "Basic" is the APPLICATION_ID that we will use for FEWS configureation.

Another way to generate "Your token" is using the following command. Note: this command is for Linux machine; on windows, one needs to replace "curl" by "curl.exe" and put it in the Windows PowerShell. Moroever, in the command, replace "APPLICATION_ID" by the strings after "Basic" in Figure 2.

curl -k -X POST https://portail-api.meteofrance.fr/token -d "grant_type=client_credentials" -H "Authorization: Basic APPLICATION_ID"

...

Step 1: In Figure 1, click on button "Use", this will open a new webpage where the URL for downloading can be generated, as seen in Figure 3.

Figure 3: the webpage for generating the URL where we can download the data.

Step 2: We firstly download the list of all station names, so that we know the station_id of a certain station that is in our interest. This can be done by clicking on "/list-stations" bar, and then clicking on button "Try it out". Then this gives a new button "Execute", click on it. This generates the information as shown in Figure 4, where under "Request URL" will be the URL we need. Copy this URL.

Figure 4: Generated URL from which we will download the list of station names.

Step 3: Open Windows PowerShell from the start bar, and type the following command to download the list of station names:

...

Step 4: now we can download data for a ceratin station, for a certain date and time. To get the corresponding URL, we can use the tool on the webpage: go to the webpage shown in Figure 3. If one wants to download an hourly data, then click on the bar of "/station/horaire", and then click on button "Try it out". Afterwards it shows as in Figure 5. 

Figure 5: Generating URL for downloading data from a certain station at a certain time with a ceratin format.

Now one can fill in for "id_station", which can be found from the list of station names downloaded in Step 3. Fill in the "date" but using the format they requred: UTC: AAAA-MM-JJThh:mm:ssZ) Then choose the format of the data file that you are going to download. Then click on button "Execute", which will generate a URL, one example is shown in Figure 6. Copy this URL.

Figure 6: an example of generating URL for downloading data from a certain station at a certain time with a ceratin format.

Step 5: In PowerShell, put the following command:

...