============================
.. warning:: Sunset notice for API versions 1.0, 1.1, 1.2, 1.3 and 2.0: after upgrading to ``flexmeasures==0.13``, users of these API versions may receive ``HTTP status 410 (Gone)`` responses.
See the `documentation for deprecation and sunset <https://flexmeasures.readthedocs.io/en/latest/api/introduction.html#deprecation-and-sunset>`_.
The relevant endpoints have been deprecated since ``flexmeasures==0.12``.
.. warning:: The API endpoint (`[POST] /sensors/(id)/schedules/trigger <api/v3_0.htmlpost--api-v3_0-sensors-(id)-schedules-trigger>`_) to make new schedules sunsets the deprecated (since v0.12) storage flexibility parameters (they move to the ``flex-model`` parameter group), as well as the parameters describing other sensors (they move to ``flex-context``).
.. warning:: Upgrading to this version requires running ``flexmeasures db upgrade`` (you can create a backup first with ``flexmeasures db-ops dump``).
.. note:: Read more on these features on `the FlexMeasures blog <https://flexmeasures.io/013-overlay-charts/>`__.
New features
-------------
* Keyboard control over replay [see `PR 562 <https://www.github.com/FlexMeasures/flexmeasures/pull/562>`_]
* Overlay charts (e.g. power profiles) on the asset page using the `sensors_to_show` attribute, and distinguish plots by source (different trace), sensor (different color) and source type (different stroke dash) [see `PR 534 <https://www.github.com/FlexMeasures/flexmeasures/pull/534>`_]
* The ``FLEXMEASURES_MAX_PLANNING_HORIZON`` config setting can also be set as an integer number of planning steps rather than just as a fixed duration, which makes it possible to schedule further ahead in coarser time steps [see `PR 583 <https://www.github.com/FlexMeasures/flexmeasures/pull/583>`_]
* Different text styles for CLI output for errors, warnings or success messages. [see `PR 609 <https://www.github.com/FlexMeasures/flexmeasures/pull/609>`_]
* Added API endpoints and webpages `/accounts` and `/accounts/<id>` to list accounts and show an overview of the assets, users and account roles of an account [see `PR 605 <https://github.com/FlexMeasures/flexmeasures/pull/605>`_]
* Avoid redundantly recomputing jobs that are triggered without a relevant state change. `FLEXMEASURES_JOB_CACHE_TTL` config setting defines the time in which the jobs with the same arguments are not being recomputed. [see `PR 616 <https://www.github.com/FlexMeasures/flexmeasures/pull/616>`_]
Bugfixes
-----------
* Fix copy button on tutorials and other documentation, so that only commands are copied and no output or comments [see `PR 636 <https://www.github.com/FlexMeasures/flexmeasures/pull/636>`_]
* GET /api/v3_0/assets/public should ask for token authentication and not forward to login page [see `PR 649 <https://www.github.com/FlexMeasures/flexmeasures/pull/649>`_]
Infrastructure / Support
----------------------
* Support blackout tests for sunset API versions [see `PR 651 <https://www.github.com/FlexMeasures/flexmeasures/pull/651>`_]
* Sunset API versions 1.0, 1.1, 1.2, 1.3 and 2.0 [see `PR 650 <https://www.github.com/FlexMeasures/flexmeasures/pull/650>`_]
* Sunset several API fields for `/sensors/<id>/schedules/trigger` (POST) that have moved into the ``flex-model`` or ``flex-context`` fields [see `PR 580 <https://www.github.com/FlexMeasures/flexmeasures/pull/580>`_]
* Fix broken `make show-data-model` command [see `PR 638 <https://www.github.com/FlexMeasures/flexmeasures/pull/638>`_]
* Bash script for a clean database to run toy-tutorial by using `make clean-db db_name=database_name` command [see `PR 640 <https://github.com/FlexMeasures/flexmeasures/pull/640>`_]