--- title: "system.historian.storeDataPoints" description: "Store a list of data points to the specified historian." --- # system.historian.storeDataPoints > Store a list of data points to the specified historian. This function is used in **Python Scripting**. ## Description Stores a list of data points to the specified historian. Data points can be provided as individual parameter lists or as objects created with [system.historian.types.dataPoint](appendix/scripting-functions/system-historian/types/system-historian-types-dataPoint.md). When provided as individual parameter lists, ensure all parameters are 1:1, meaning all provided lists must be of the same length. If a particular annotation doesn't need a parameter, that element can be None in the list. :::note It is possible to store two datapoints with the same timestamp with the Core Historian. If this occurs, the trends will use the highest value point for interpolation. However, it is **not** recommended to attempt storing two points with identical timestamps. ::: ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax #1 `system.historian.storeDataPoints(paths, values, [timestamps], [qualities])` ### Parameters |Type| Parameter| Description| |--|--|--| |List| `paths`|A list of qualified historical paths. See [Path Syntax](appendix/scripting-functions/system-historian/system-historian.md#path-syntax) for more information on recommended syntax.| |List|`values` |A list of historical values.| |List| `timestamps`|A list of timestamps. If omitted, the current time will be used. [optional] **Note**: Including timestamps ensures accuracy of your data. They should only be excluded if you wish to store a single point with the current timestamp of the Gateway. | |List|`qualities` |A list of qualities. Quality codes can be found on the [Quality Codes and Overlays](platform\tags\quality-codes-and-overlays\quality-codes-and-overlays.md#quality-code-reference-table) page. If omitted, Good quality will be used.[optional]| |Boolean| `blockForResult`| Whether the result should be blocked until confirmation that the storage has been attempted. Default is True. [optional]| ### Returns **List** - A list of [QualityCode](appendix\reference-pages\scripting-object-reference\scripting-object-reference.md#qualitycode) objects. The quality code will indicate success or failure. ### Scope Gateway, Vision Client, Perspective Session ## Syntax #2 `system.historian.storeDataPoints(datapoints)` ### Parameters |Type| Parameter| Description| |--|--|--| |List| `datapoints`|A list of data point Java objects created with `system.historian.types.dataPoint`. | ### Returns **List** - A list of [QualityCode](appendix\reference-pages\scripting-object-reference\scripting-object-reference.md#qualitycode) objects. The quality code will indicate success or failure. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Syntax #1 Code Snippet" paths = ["histprov:mariadb:/sys:gatewayName1:/prov:default:/tag:test_a"] values = [1] timestamps = [system.date.now()] qualities = [192] listOfQualityCodes = system.historian.storeDataPoints(paths, values, timestamps, qualities) ``` ```python title="Syntax #2 Code Snippet" source = "histprov:SQL_Historian:/sys:GW1:/prov:default:/tag:test_tag" value = 100 datapoints = [system.historian.types.dataPoint(source, value)] system.historian.storeDataPoints(datapoints) ```