Skip to content

use the 202 status consistently in triggering endpoints #2224

Open
nhoening wants to merge 12 commits into
mainfrom
feat/api/use-202-status-consistenly-in-triggering-and-fetching-endpoints
Open

use the 202 status consistently in triggering endpoints #2224
nhoening wants to merge 12 commits into
mainfrom
feat/api/use-202-status-consistenly-in-triggering-and-fetching-endpoints

Conversation

@nhoening

@nhoening nhoening commented Jun 5, 2026

Copy link
Copy Markdown
Member

Description

Use 202 in triggering endoints (forecasting scheduling) and provide follow-up URLs in the response.

Closes #2171

  • changes three trigger endpoint to return 202 when the job is accepted (instead of 200): sensor schedule trigger, asset schedule trigger, and sensor forecast trigger.
  • updates tutorial docs, too: toy-example-expanded.rst and toy-example-from-scratch.rst.
  • introduces job_id as the canonical response field while keeping legacy schedule / forecast fields for compatibility.
  • adds _deprecated_fields metadata, to deprecate fields in endpoints, and for schedule / forecast fields, employ it with use: "job_id" and deprecated_since: "1.0.0".
  • generalizes request_accepted_for_processing(...) so accepted job responses can include legacy keys and result URLs.

Look & Feel

Mainly Sphinx and Swaggerdocs.

How to test

The only new test is test_get_schedule_unfinished_job_returns_202_when_sunset_active.

A bunch of tests simply check for 202 now instead of 200.

… scheduling) and provide follow-up URLs in the response

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening self-assigned this Jun 5, 2026
@nhoening nhoening added this to the 1.0.0 milestone Jun 5, 2026
nhoening added 3 commits June 6, 2026 01:18
…ished (just like get_forecast) - for now only use this (over the old 400 code) if API_SUNSET is being used

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…ering-and-fetching-endpoints

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…ering-and-fetching-endpoints

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@read-the-docs-community

read-the-docs-community Bot commented Jul 11, 2026

Copy link
Copy Markdown

nhoening added 3 commits July 12, 2026 01:52
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening
nhoening requested a review from Flix6x July 12, 2026 20:32
Comment thread documentation/api/introduction.rst Outdated
Comment thread documentation/api/introduction.rst Outdated
Comment thread documentation/api/introduction.rst Outdated
Comment thread documentation/api/introduction.rst
Comment thread documentation/api/introduction.rst
Comment thread documentation/api/introduction.rst Outdated
Comment thread documentation/api/introduction.rst Outdated
Comment thread documentation/changelog.rst Outdated
Comment thread documentation/changelog.rst Outdated
Comment thread documentation/tut/toy-example-from-scratch.rst
nhoening added 5 commits July 15, 2026 00:43
…camel-case - even in existing job status endpoitn fields (using the new field-deprecation logic)

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…ering-and-fetching-endpoints

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…other review comments dealing with docs

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…etching-endpoints' of github.com:FlexMeasures/flexmeasures into feat/api/use-202-status-consistenly-in-triggering-and-fetching-endpoints
…ering-and-fetching-endpoints

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening
nhoening requested a review from Flix6x July 17, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch forecasting and schedule - triggering endpoints to 202 Accepted

2 participants