From 732971c40b3804e1afa71bde741590bea342fd7a Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Thu, 11 Sep 2025 09:55:28 +0200 Subject: [PATCH 1/4] docs: fix json syntax in example request Signed-off-by: F.N. Claessen --- flexmeasures/api/v3_0/sensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flexmeasures/api/v3_0/sensors.py b/flexmeasures/api/v3_0/sensors.py index 84c2904a28..725d9dd4c1 100644 --- a/flexmeasures/api/v3_0/sensors.py +++ b/flexmeasures/api/v3_0/sensors.py @@ -291,7 +291,7 @@ def upload_data( { "data": [ { - "uploaded-files": "[\"file1.csv\", \"file2.csv\"]" + "uploaded-files": ["file1.csv", "file2.csv"] } ] } From 34c5ea46dbe8626d79861fa7775c2d3b38f60056 Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Thu, 11 Sep 2025 09:55:56 +0200 Subject: [PATCH 2/4] docs: fix wrong nesting Signed-off-by: F.N. Claessen --- flexmeasures/api/v3_0/sensors.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/flexmeasures/api/v3_0/sensors.py b/flexmeasures/api/v3_0/sensors.py index 725d9dd4c1..103c3baa6d 100644 --- a/flexmeasures/api/v3_0/sensors.py +++ b/flexmeasures/api/v3_0/sensors.py @@ -289,11 +289,7 @@ def upload_data( .. code-block:: json { - "data": [ - { - "uploaded-files": ["file1.csv", "file2.csv"] - } - ] + "uploaded-files": ["file1.csv", "file2.csv"] } The file should have columns for a timestamp (event_start) and a value (event_value). From 646a837cf00856c11c76710f65eedb1dadc0da6f Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Thu, 11 Sep 2025 14:24:26 +0200 Subject: [PATCH 3/4] docs: clarify that files are not string, but binary objects Signed-off-by: F.N. Claessen --- flexmeasures/api/v3_0/sensors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flexmeasures/api/v3_0/sensors.py b/flexmeasures/api/v3_0/sensors.py index 103c3baa6d..f307d84967 100644 --- a/flexmeasures/api/v3_0/sensors.py +++ b/flexmeasures/api/v3_0/sensors.py @@ -289,9 +289,11 @@ def upload_data( .. code-block:: json { - "uploaded-files": ["file1.csv", "file2.csv"] + "uploaded-files": ["", ""] } + where the ``uploaded-files`` field should be sent as a multipart file upload. + The file should have columns for a timestamp (event_start) and a value (event_value). The timestamp should be in ISO 8601 format. The value should be a numeric value. From 815154b81c217022c18df3473170ee0967855c50 Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Thu, 11 Sep 2025 14:29:38 +0200 Subject: [PATCH 4/4] docs: add belief-time-measured-instantly to example Signed-off-by: F.N. Claessen --- flexmeasures/api/v3_0/sensors.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flexmeasures/api/v3_0/sensors.py b/flexmeasures/api/v3_0/sensors.py index f307d84967..2dbc320fb9 100644 --- a/flexmeasures/api/v3_0/sensors.py +++ b/flexmeasures/api/v3_0/sensors.py @@ -289,11 +289,16 @@ def upload_data( .. code-block:: json { - "uploaded-files": ["", ""] + "uploaded-files": ["", ""], + "belief-time-measured-instantly": false } where the ``uploaded-files`` field should be sent as a multipart file upload. + By default, the belief time of the recorded data will be the time at which the data was received. + To record the data as if it were sent right after the fact, + set the optional ``belief-time-measured-instantly`` field to ``true``. + The file should have columns for a timestamp (event_start) and a value (event_value). The timestamp should be in ISO 8601 format. The value should be a numeric value.