API Guide
How to Use Guide | WeatherX API Documentation¶
Experience WeatherX API in minutes!¶
One Central Source for API – Fetch, manage, view, and document all your company data on one easy-to-use platform in the WeatherX Dashboard. WeatherX API provides functionality, educational, and inspire usage as well as certain accuracy with your dashboard.Credentials¶
In the scope of your subscription plan, the first thing you need to do is to prepare your credentials which are already defined for your WeatherX Dashboard in order to access the server.In [ ]:
import requests
base_URL = "https://dashboard.weatherx.de/api/data?"
credentials = {"username": "YOUR CLIENT ID", "password": "YOUR PASSWORD"}
Please ensure that you have received an email containing your credentials. If you haven't received your credentials by email, please check your spam folder. A typical username format is "4xxx-xx-xxxxx-x", and our system assigns the password automatically.
Selection of Product and/or Location¶
In [ ]:
# Ensure that multiple products/locations must be seperated by comma (,)
# If you want to fetch all products/locations, please type 'all'.
### Example
### products = "Relative Humidity 2m,Hail,Precipitation"
### locations = "all"
products = "SELECT A PRODUCT"
locations = "SELECT A LOCATION"
response = requests.get(f"{base_URL}Product={products}&Loc={locations}", headers=credentials)
Return Object¶
In [ ]:
print(response.json().keys())
# dict_keys(['Gusts 100m'])
Return object is in json format which contains the products as keys. If you select a product via return object, the output format will be:
In [ ]:
response.json()["Gusts 100m"].keys()
# dict_keys(['Data', 'Unit', 'Valid Time', 'Initial Time'])
Data : Raw data (float)
Unit : Product unit (string)
Valid Time : Hourly valid time of the forecast ('YYYY-mm-dd HH:MM' format)
Initial Time : Model run time (string)
Weather forecasts for geolocations controlled by your company will be available after you submit these credentials. The forecasts you can view are based on the locations of your operations and assets.
That's it!¶
If you are having any issues using WeatherX API service, or if you require any further information, do not hesitate to contact us via info@weatherx.de.