Heimdall Forecast
Build & Deploy custom forecasters to predict the future needs of your business.
API Specifications
Endpoint
POST https://predict.heimdallapp.org/forecast/
Request Headers
- x-api-key - API key that is issued when the endpoint is configured.
- x-username - Username associated with your account.
- x-forecast-id - Unique identifier associated with the forecaster.
All request headers are required. Forecast ID can be found on the forecast details page.
API Keys are issued one time and cannot be retrieved. If you lose your API key, please disable the endpoint in the forecast details page and reconfigure to get a new API key.
Request Body
- time_windows - Specifiess number of time windows to predict into the future.
- exog - A dictionary of exogenous variables as lists. Each variable will have its own list.
The time windows will have an equal interval as your forecaster. If your forecaster was trained on an monthly interval, your time window will be months and you can specify how many months into future you want to forecast.
Response Object
- prediction A dictionary of forecasted values where the key is the timestamp and the value is the forecast.
{
"prediction": {
"2015-01-13T09:00:00": 949.9992872826177,
"2015-01-13T10:00:00": 1008.0855648638276
}
}
The length of your dictionary is equal to the number of time windows in your request.
You will receieve a 422 error your request body structure is incorrect.
Sample Request
Use the below sample request in Python to get started. You can also use the code editor in the forecast details page to test your specific forecast endpoint.
You need to fill in your specific header values.
import requests
url = 'https://predict.heimdallapp.org/forecast/'
headers = {
'X-api-key': 'YOUR-API-KEY',
'X-username': 'YOUR-USERNAME',
'x-forecast-id': 'YOUR-FORECAST-ID'
}
data = {
"time_windows": 1
"exog": {
"total_holidays": [],
}
}
response = requests.post(url, headers=headers, json=data)