Timeseries Event List
Endpoint for interacting with raw time-series events (read-write).
GET
Retrieving a paginated list of events requires a GET request to a list URL:
GET /api/v4/timeseries/<uuid>/events/
Retrieving a single event requires a GET request to a detail URL:
GET /api/v4/timeseries/<uuid>/events/<datetime>/
Note that <datetime>
should be an ISO 8601 date and time representation,
for example 2020-01-01T00:00:00Z. If no time zone is provided, UTC is
assumed. Historic values may be obtained as follows:
GET /api/v4/timeseries/<uuid>/events/<datetime>/history/
POST
Creating and/or updating events requires a POST request to a list URL:
POST /api/v4/timeseries/<uuid>/events/
The JSON payload should be a list of one or more events, for example:
[
{"time": "2020-03-20T01:00:00Z", "value": 3.14},
{"time": "2020-03-20T01:05:00Z", "value": 2.72}
]
It's also possible to post a CSV file as multipart form data. The first line of the file should describe the column names, for example:
time, value
2020-03-20T01:00:00Z, 3.14
2020-03-20T01:05:00Z, 2.72
Depending on the value_type
of the corresponding time series, the
following fields may be set:
time
: ISO 8601 date and time representation. This is a required field.
value
: A number, string, or boolean, depending on the value_type
of
the corresponding time series. Nullable for numbers. Since float
is
the most commonly used value_type
, numbers are predominant.
flag
: A small integer. Nullable. Not available for booleans.
validation_code
: A string of at most 3 characters. Available for
numbers and booleans.
comment
: A string. Available for numbers and booleans.
detection_limit
: Either "", "<", or ">". Only available for numbers.
async
: boolean (default false). Whether the data should be processed asynchronously (non-blocking).
DELETE
Deleting all events requires a DELETE request on a list URL:
DELETE /api/v4/timeseries/<uuid>/events/
Note that this will delete historic values as well! Query parameters (see below) may be used to control what events get deleted, for example:
DELETE /api/v4/timeseries/<uuid>/events/?time__year=2020
Deleting a single event requires a DELETE request on a detail URL:
DELETE /api/v4/timeseries/<uuid>/events/<datetime>/
Query parameters:
time: Filter on time
. A variety of lookups are available, see the
examples below. The aliases start
and end
may be used instead of
time__gte
and time__lt
, respectively.
value: Filter on value
. For numbers, exact
(the default), lt
,
gt
, lte
, gte
, and isnull
are supported. For strings, exact
(the default) and startswith
are supported. For booleans, only
exact
is available.
flag: Filter on flag
. Supported lookups: exact
(the default),
lt
, gt
, lte
, gte
, and isnull
.
validation_code: Filter on validation_code
. Only exact
(the
default), startswith
, and is_empty
is supported.
last_modified: Filter on last_modified
. Supported lookups: exact
(the default), lt
, gt
, lte
, and gte
.
detection_limit: Filter on detection_limit
. Only exact
(the
default) and is_empty
is supported. To filter on <
and >
,
it might be necessary to use URL encoding, so %3C
and %3E
,
respectively.
Query parameters may be combined for advanced filtering.
Examples
?time=2020-04-23T00:00:00Z
?time__gte=2020-04-23T00:00:00Z
?time__lt=2022-04-23T00:00:00Z
?time__gte=2020-04-23T00:00:00Z&time__lt=2022-04-23T00:00:00Z
?start=2020-04-23T00:00:00Z&end=2022-04-23T00:00:00Z
?time__range=2020-04-23T00:00:00Z,2022-04-23T00:00:00Z
?time__year=2020
?time__time=00:05
?value=0.5
?value=xyz
?value=true
?value__isnull=true
?flag__in=5,6,7
?validation_code__startswith=W
?last_modified__gte=2021-04-23T00:00:00Z
?detection_limit__isempty=false
?detection_limit__isempty=%3C
GET /api/v4/timeseries/ac7a93c3-9714-42c0-8ce3-0f9d17310d6c/events/?format=api
https://zuiderzeeland.lizard.net/api/v4/timeseries/ac7a93c3-9714-42c0-8ce3-0f9d17310d6c/events/?format=api&page=2", "previous": null, "results": [ { "time": "2022-03-31T08:09:11Z", "value": 10.34, "flag": 0, "validation_code": "", "comment": "nieuwe peilbuis Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer DL648 Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte Kabellengte 600 Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer Kabelnummer 39387418", "last_modified": "2023-01-24T07:05:35.176280Z", "detection_limit": "" }, { "time": "2022-03-31T08:25:45Z", "value": null, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-01-23T06:24:33.116492Z", "detection_limit": "" }, { "time": "2022-04-19T09:10:13Z", "value": 10.29, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-01-23T06:24:33.116510Z", "detection_limit": "" }, { "time": "2022-08-04T08:22:21Z", "value": 9.61, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-01-23T06:24:33.116525Z", "detection_limit": "" }, { "time": "2022-09-08T09:20:57Z", "value": null, "flag": 0, "validation_code": "", "comment": "kabel verlengt naar 7 meter Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer Instrument nummer DL648", "last_modified": "2023-01-23T06:24:33.116539Z", "detection_limit": "" }, { "time": "2023-01-25T10:37:34Z", "value": 9.9, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-01-26T11:03:57.546979Z", "detection_limit": "" }, { "time": "2023-04-20T10:25:04Z", "value": 10.14, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-04-21T06:10:50.871826Z", "detection_limit": "" }, { "time": "2023-07-19T10:29:39Z", "value": 9.77, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-07-19T13:13:48.084503Z", "detection_limit": "" }, { "time": "2023-10-30T10:02:27Z", "value": 9.89, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2023-10-30T12:14:51.605976Z", "detection_limit": "" }, { "time": "2024-01-22T08:10:01Z", "value": 11.08, "flag": 0, "validation_code": "", "comment": "", "last_modified": "2024-01-22T10:14:26.974951Z", "detection_limit": "" } ] }{ "count": 15, "next": "