Python examples
Write Time Series Data
writing points to a measurement if you're writing data points through the historian api, it's important to understand how influxdb stores time series data we recommend reviewing the docid\ b6bfdkcza5v8hidjzxq1h , especially the section on choosing between tags and fields misusing tags—for example, storing high cardinality or numeric values—can have serious performance implications this code writes data points to a measurement ( https //historian mycompany com 18000/api/swagger/#/collectors/createpoints ) it requires a collectoruuid and measurementuuid to be filled in the collector uuid can be retrieved by docid\ pc5 4ldexbiryshmxcdph the measurement uuid can be retrieved from where it was created docid\ ocuypopzcouihwwzc vj7 post post https //historian mycompany com 18000/api/collector/collectors/{collector uuid}/points (replace {collector uuid} with your collector uuid) def write points(collector uuid str, points) url = f"{base url}/collector/collectors/{collector uuid}/points" resp = session post(url, json=points, timeout=60) resp raise for status() return resp json() points = \[{ "measurementuuid" "my measurement uuid", "timestamp" "2025 09 19t12 41 33 854z", "value" "string" # first point }, { "errorstatus" "this is a bad status!", "measurementuuid" "my measurement uuid", "tags" {}, "timestamp" "2025 09 19t12 42 30 854z", "value" "bad string" # second point }] write result = write points("my collector uuid", points) print(json dumps(write result, indent=2)) successful response { }