Support new forecasting endpoints (/sensors/{id}/forecasts/trigger and /sensors/{id}/forecasts/{uuid})#180
Draft
Support new forecasting endpoints (/sensors/{id}/forecasts/trigger and /sensors/{id}/forecasts/{uuid})#180
/sensors/{id}/forecasts/trigger and /sensors/{id}/forecasts/{uuid})#180Conversation
Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>
…ecast Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support new forecasting API endpoints in client
Support new forecasting endpoints (Feb 23, 2026
/sensors/{id}/forecasts/trigger and /sensors/{id}/forecasts/{uuid})
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FlexMeasures server v0.31.0 introduced
POST /sensors/{id}/forecasts/triggerandGET /sensors/{id}/forecasts/{uuid}for async forecast job execution. This adds client-side support for both.New methods
trigger_forecast(sensor_id, ...)— POSTs to/sensors/{id}/forecasts/trigger, returns forecast job UUID. Training params (train_start,train_period,retrain_frequency, regressors, etc.) are serialized into a nestedconfigdict per the server schema.get_forecast(sensor_id, forecast_id)— GETs/sensors/{id}/forecasts/{uuid}, polling on202until the job completes (200). Returns{values, start, duration, unit}.trigger_and_get_forecast(sensor_id, ...)— Convenience wrapper combining both.Usage
Requires FlexMeasures server ≥ 0.31.0.
get_forecastrespects the client's existingpolling_timeout,polling_interval, andmax_polling_stepssettings.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.