> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/enlyze-api/api-referenz/variables.md).

# Variables

## Get Variables

> Returns a paginated list of variables. A variable represents a process\
> measure of one machine of which timeseries data is captured and stored in\
> the ENLYZE platform. One machine may have many variables, whereas one\
> variable is only associated with one machine.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Variables"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"VariableType":{"type":"string","enum":["spark","derived"],"title":"VariableType"},"VariableCapturingState":{"type":"string","enum":["inactive","active","evaluating"],"title":"VariableCapturingState"},"VariableDataType":{"type":"string","enum":["FLOAT","INTEGER","STRING","BOOLEAN","ARRAY_FLOAT","ARRAY_INTEGER","ARRAY_STRING","ARRAY_BOOLEAN"],"title":"VariableDataType"},"PaginatedVariables":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VariableResponse"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedVariables"},"VariableResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier of the variable."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The machine the variable is associated with."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"type":{"$ref":"#/components/schemas/VariableType","description":"Deprecated; use `details.type`, which this mirrors.","default":"spark","deprecated":true},"details":{"oneOf":[{"$ref":"#/components/schemas/SparkVariableDetails"},{"$ref":"#/components/schemas/DerivedVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"derived":"#/components/schemas/DerivedVariableDetails","spark":"#/components/schemas/SparkVariableDetails"}}}},"type":"object","required":["uuid","machine","data_type","details"],"title":"VariableResponse"},"SparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type","default":"spark"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"anyOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"},{"additionalProperties":true,"type":"object"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. S7, S7Plus and Modbus data sources get a typed shape; any other protocol family falls back to a verbatim object."},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"$ref":"#/components/schemas/VariableCapturingState","description":"Current capturing state."}},"type":"object","required":["data_source","origin_identifier","state"],"title":"SparkVariableDetails"},"S7OriginIdentifier":{"properties":{"type":{"type":"string","const":"s7","title":"Type","default":"s7"},"code":{"type":"string","title":"Code","description":"S7 address: an area prefix (`DB<n>:`, `I`, `Q`, `M`, or the S7-200 `V` alias for `DB1`), an optional size marker (`B`/`W`/`D`), a byte offset, and an optional `.<bit>` suffix, e.g. `DB400:12`, `MW2`, `I0.1`."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/StaticS7DataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"PLC data type: one of `BOOL`, `CHAR`, `BYTE`, `INT`, `DINT`, `WORD`, `DWORD`, `REAL`, `STRING` or a capped `STRING[n]` (n = byte length)."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7VariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."}},"type":"object","required":["code","data_type"],"title":"S7OriginIdentifier"},"StaticS7DataType":{"type":"string","enum":["BOOL","CHAR","BYTE","INT","DINT","WORD","DWORD","REAL","STRING"],"title":"StaticS7DataType"},"S7VariableHint":{"type":"string","enum":["ignore_length"],"title":"S7VariableHint"},"S7PlusOriginIdentifier":{"properties":{"type":{"type":"string","const":"s7plus","title":"Type","default":"s7plus"},"code":{"type":"string","title":"Code","description":"S7Plus symbolic access code, e.g. `Input15` or `DB30:90:2`."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7PlusVariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."},"unoptimized_type":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/S7PlusUnoptimizedType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"},{"type":"string","pattern":"(?i)^WSTRING\\[(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)\\]$"}],"description":"How the raw value read from this S7Plus variable is interpreted: a scalar type (`Char`, `Int`, `Real`, …) or a capped `String[n]` / `WString[n]`."},{"type":"null"}],"title":"Unoptimized Type"}},"type":"object","required":["code"],"title":"S7PlusOriginIdentifier"},"S7PlusVariableHint":{"type":"string","enum":["string","ignore_length"],"title":"S7PlusVariableHint"},"S7PlusUnoptimizedType":{"type":"string","enum":["Char","Byte","Int","Word","DInt","DWord","Real","Bool","Date","LInt","ULInt","USInt","UInt","UDInt","LReal","LTime","LDT","DTL","WChar"],"title":"S7PlusUnoptimizedType"},"ModbusOriginIdentifier":{"properties":{"type":{"type":"string","const":"modbus","title":"Type","default":"modbus"},"slave_id":{"type":"integer","maximum":255,"minimum":0,"title":"Slave Id","description":"Modbus slave/unit id."},"address":{"type":"integer","maximum":65535,"minimum":0,"title":"Address","description":"Register address."},"register_type":{"$ref":"#/components/schemas/ModbusRegisterType","description":"Which Modbus register table."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/ModbusDataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"Register data type: one of `BOOL`, `INT16`, `INT32BE`, `INT32LE`, `INT64BE`, `INT64LE`, `UINT16`, `UINT32BE`, `UINT32LE`, `UINT64BE`, `UINT64LE`, `FLOAT32BE`, `FLOAT32LE`, `FLOAT64BE`, `FLOAT64LE`, or a capped `STRING[n]` (n = byte length)."}},"type":"object","required":["slave_id","address","register_type","data_type"],"title":"ModbusOriginIdentifier"},"ModbusRegisterType":{"type":"string","enum":["coil","input","holding","discrete_input"],"title":"ModbusRegisterType"},"ModbusDataType":{"type":"string","enum":["BOOL","INT16","INT32BE","INT32LE","INT64BE","INT64LE","UINT16","UINT32BE","UINT32LE","UINT64BE","UINT64LE","FLOAT32BE","FLOAT32LE","FLOAT64BE","FLOAT64LE"],"title":"ModbusDataType"},"DerivedVariableDetails":{"properties":{"type":{"type":"string","const":"derived","title":"Type","default":"derived"},"dependencies":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Dependencies","description":"The variables this derived variable is computed from."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"How the variable is computed."}},"type":"object","title":"DerivedVariableDetails"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/variables":{"get":{"tags":["Variables"],"summary":"Get Variables","description":"Returns a paginated list of variables. A variable represents a process\nmeasure of one machine of which timeseries data is captured and stored in\nthe ENLYZE platform. One machine may have many variables, whereas one\nvariable is only associated with one machine.","operationId":"get_variables_v2_variables_get","parameters":[{"name":"machine","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more machine UUIDs."}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/VariableType"},"maxItems":50},{"type":"null"}],"title":"Filter by variable type."}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/VariableCapturingState"},"maxItems":50},{"type":"null"}],"title":"Filter by SPARK capturing state.","description":"Spark-only; never filters out derived variables. Defaults to `active` when omitted.","default":["active"]},"description":"Spark-only; never filters out derived variables. Defaults to `active` when omitted."},{"name":"data_source","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more data source UUIDs."}},{"name":"data_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/VariableDataType"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more data types."}},{"name":"uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Fetch specific variables by UUID."}},{"name":"depends_on","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Derived variables depending on the given variable(s)."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVariables"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Variable

> Create one SPARK variable. Create-only: if a variable already exists for the\
> \`(data\_source, origin\_identifier)\` it is never modified — the request returns\
> \`409\` carrying the existing variable. Creating a variable \`active\` requires a\
> non-empty \`display\_name\`.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Variables"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"CreateVariableItem":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"details":{"oneOf":[{"$ref":"#/components/schemas/CreateSparkVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"spark":"#/components/schemas/CreateSparkVariableDetails"}}}},"type":"object","required":["data_type","details"],"title":"CreateVariableItem"},"VariableDataType":{"type":"string","enum":["FLOAT","INTEGER","STRING","BOOLEAN","ARRAY_FLOAT","ARRAY_INTEGER","ARRAY_STRING","ARRAY_BOOLEAN"],"title":"VariableDataType"},"CreateSparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"oneOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. Only S7, S7Plus and Modbus data sources can be written; the identifier must match the data source's protocol family.","discriminator":{"propertyName":"type","mapping":{"modbus":"#/components/schemas/ModbusOriginIdentifier","s7":"#/components/schemas/S7OriginIdentifier","s7plus":"#/components/schemas/S7PlusOriginIdentifier"}}},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"anyOf":[{"$ref":"#/components/schemas/VariableCapturingState"},{"type":"null"}],"description":"Capturing state to create the variable in. Omit to use the default (`inactive`). Creating a variable `active` requires a non-empty `display_name`."}},"type":"object","required":["type","data_source","origin_identifier"],"title":"CreateSparkVariableDetails"},"S7OriginIdentifier":{"properties":{"type":{"type":"string","const":"s7","title":"Type","default":"s7"},"code":{"type":"string","title":"Code","description":"S7 address: an area prefix (`DB<n>:`, `I`, `Q`, `M`, or the S7-200 `V` alias for `DB1`), an optional size marker (`B`/`W`/`D`), a byte offset, and an optional `.<bit>` suffix, e.g. `DB400:12`, `MW2`, `I0.1`."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/StaticS7DataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"PLC data type: one of `BOOL`, `CHAR`, `BYTE`, `INT`, `DINT`, `WORD`, `DWORD`, `REAL`, `STRING` or a capped `STRING[n]` (n = byte length)."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7VariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."}},"type":"object","required":["code","data_type"],"title":"S7OriginIdentifier"},"StaticS7DataType":{"type":"string","enum":["BOOL","CHAR","BYTE","INT","DINT","WORD","DWORD","REAL","STRING"],"title":"StaticS7DataType"},"S7VariableHint":{"type":"string","enum":["ignore_length"],"title":"S7VariableHint"},"S7PlusOriginIdentifier":{"properties":{"type":{"type":"string","const":"s7plus","title":"Type","default":"s7plus"},"code":{"type":"string","title":"Code","description":"S7Plus symbolic access code, e.g. `Input15` or `DB30:90:2`."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7PlusVariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."},"unoptimized_type":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/S7PlusUnoptimizedType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"},{"type":"string","pattern":"(?i)^WSTRING\\[(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)\\]$"}],"description":"How the raw value read from this S7Plus variable is interpreted: a scalar type (`Char`, `Int`, `Real`, …) or a capped `String[n]` / `WString[n]`."},{"type":"null"}],"title":"Unoptimized Type"}},"type":"object","required":["code"],"title":"S7PlusOriginIdentifier"},"S7PlusVariableHint":{"type":"string","enum":["string","ignore_length"],"title":"S7PlusVariableHint"},"S7PlusUnoptimizedType":{"type":"string","enum":["Char","Byte","Int","Word","DInt","DWord","Real","Bool","Date","LInt","ULInt","USInt","UInt","UDInt","LReal","LTime","LDT","DTL","WChar"],"title":"S7PlusUnoptimizedType"},"ModbusOriginIdentifier":{"properties":{"type":{"type":"string","const":"modbus","title":"Type","default":"modbus"},"slave_id":{"type":"integer","maximum":255,"minimum":0,"title":"Slave Id","description":"Modbus slave/unit id."},"address":{"type":"integer","maximum":65535,"minimum":0,"title":"Address","description":"Register address."},"register_type":{"$ref":"#/components/schemas/ModbusRegisterType","description":"Which Modbus register table."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/ModbusDataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"Register data type: one of `BOOL`, `INT16`, `INT32BE`, `INT32LE`, `INT64BE`, `INT64LE`, `UINT16`, `UINT32BE`, `UINT32LE`, `UINT64BE`, `UINT64LE`, `FLOAT32BE`, `FLOAT32LE`, `FLOAT64BE`, `FLOAT64LE`, or a capped `STRING[n]` (n = byte length)."}},"type":"object","required":["slave_id","address","register_type","data_type"],"title":"ModbusOriginIdentifier"},"ModbusRegisterType":{"type":"string","enum":["coil","input","holding","discrete_input"],"title":"ModbusRegisterType"},"ModbusDataType":{"type":"string","enum":["BOOL","INT16","INT32BE","INT32LE","INT64BE","INT64LE","UINT16","UINT32BE","UINT32LE","UINT64BE","UINT64LE","FLOAT32BE","FLOAT32LE","FLOAT64BE","FLOAT64LE"],"title":"ModbusDataType"},"VariableCapturingState":{"type":"string","enum":["inactive","active","evaluating"],"title":"VariableCapturingState"},"VariableResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier of the variable."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The machine the variable is associated with."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"type":{"$ref":"#/components/schemas/VariableType","description":"Deprecated; use `details.type`, which this mirrors.","default":"spark","deprecated":true},"details":{"oneOf":[{"$ref":"#/components/schemas/SparkVariableDetails"},{"$ref":"#/components/schemas/DerivedVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"derived":"#/components/schemas/DerivedVariableDetails","spark":"#/components/schemas/SparkVariableDetails"}}}},"type":"object","required":["uuid","machine","data_type","details"],"title":"VariableResponse"},"VariableType":{"type":"string","enum":["spark","derived"],"title":"VariableType"},"SparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type","default":"spark"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"anyOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"},{"additionalProperties":true,"type":"object"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. S7, S7Plus and Modbus data sources get a typed shape; any other protocol family falls back to a verbatim object."},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"$ref":"#/components/schemas/VariableCapturingState","description":"Current capturing state."}},"type":"object","required":["data_source","origin_identifier","state"],"title":"SparkVariableDetails"},"DerivedVariableDetails":{"properties":{"type":{"type":"string","const":"derived","title":"Type","default":"derived"},"dependencies":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Dependencies","description":"The variables this derived variable is computed from."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"How the variable is computed."}},"type":"object","title":"DerivedVariableDetails"},"ReadoutLimitExceededError":{"properties":{"type":{"type":"string","const":"readout_limit_exceeded","title":"Type","default":"readout_limit_exceeded"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source whose read-out capacity was exceeded."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["data_source","limit"],"title":"ReadoutLimitExceededError"},"TooManyStateChangesError":{"properties":{"type":{"type":"string","const":"too_many_state_changes","title":"Type","default":"too_many_state_changes"},"requested":{"type":"integer","title":"Requested","description":"Number of items in the request carrying a state change."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["requested","limit"],"title":"TooManyStateChangesError"},"DuplicateOriginIdentifierError":{"properties":{"type":{"type":"string","const":"duplicate_origin_identifier","title":"Type","default":"duplicate_origin_identifier"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the identifier is duplicated within."}},"additionalProperties":true,"type":"object","required":["index","data_source"],"title":"DuplicateOriginIdentifierError"},"ActiveRequiresDisplayNameError":{"properties":{"type":{"type":"string","const":"active_requires_display_name","title":"Type","default":"active_requires_display_name"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"ActiveRequiresDisplayNameError"},"InvalidOriginIdentifierError":{"properties":{"type":{"type":"string","const":"invalid_origin_identifier","title":"Type","default":"invalid_origin_identifier"},"reason":{"$ref":"#/components/schemas/InvalidOriginIdentifierReason","description":"Coarse category of why the identifier was rejected."},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","required":["reason"],"title":"InvalidOriginIdentifierError"},"InvalidOriginIdentifierReason":{"type":"string","enum":["malformed","family_mismatch","data_type_mismatch"],"title":"InvalidOriginIdentifierReason"},"SparkDetailsOnDerivedVariableError":{"properties":{"type":{"type":"string","const":"spark_details_on_derived_variable","title":"Type","default":"spark_details_on_derived_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"SparkDetailsOnDerivedVariableError"},"DataTypeChangeRequiresInactiveError":{"properties":{"type":{"type":"string","const":"data_type_change_requires_inactive","title":"Type","default":"data_type_change_requires_inactive"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeRequiresInactiveError"},"DataTypeChangeOnTransformedVariableError":{"properties":{"type":{"type":"string","const":"data_type_change_on_transformed_variable","title":"Type","default":"data_type_change_on_transformed_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeOnTransformedVariableError"},"ScalingFactorUnsupportedForDataTypeError":{"properties":{"type":{"type":"string","const":"scaling_factor_unsupported_for_data_type","title":"Type","default":"scaling_factor_unsupported_for_data_type"},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","title":"ScalingFactorUnsupportedForDataTypeError"},"UnknownVariableError":{"properties":{"type":{"type":"string","title":"Type","description":"Identifies the specific error.","default":"unknown"}},"additionalProperties":true,"type":"object","title":"UnknownVariableError"},"NotFoundError":{"properties":{"msg":{"type":"string","const":"not found","title":"Msg","default":"not found"}},"type":"object","title":"NotFoundError"},"VariableCreateConflict":{"properties":{"type":{"type":"string","enum":["already_exists","conflict"],"title":"Type","description":"`already_exists` — the existing variable matches every field the request asserted. `conflict` — it disagrees on at least one."},"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The existing variable."}},"type":"object","required":["type","uuid"],"title":"VariableCreateConflict"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/variables":{"post":{"tags":["Variables"],"summary":"Create Variable","description":"Create one SPARK variable. Create-only: if a variable already exists for the\n`(data_source, origin_identifier)` it is never modified — the request returns\n`409` carrying the existing variable. Creating a variable `active` requires a\nnon-empty `display_name`.","operationId":"create_variable_v2_variables_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVariableItem"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableResponse"}}}},"400":{"description":"The request was rejected on a business rule and nothing was created. Unlike on the bulk endpoints, the error carries no `index` — there is no `data` array to correlate into. (`422` is used for request-shape validation.)","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ReadoutLimitExceededError"},{"$ref":"#/components/schemas/TooManyStateChangesError"},{"$ref":"#/components/schemas/DuplicateOriginIdentifierError"},{"$ref":"#/components/schemas/ActiveRequiresDisplayNameError"},{"$ref":"#/components/schemas/InvalidOriginIdentifierError"},{"$ref":"#/components/schemas/SparkDetailsOnDerivedVariableError"},{"$ref":"#/components/schemas/DataTypeChangeRequiresInactiveError"},{"$ref":"#/components/schemas/DataTypeChangeOnTransformedVariableError"},{"$ref":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}],"discriminator":{"propertyName":"type","mapping":{"readout_limit_exceeded":"#/components/schemas/ReadoutLimitExceededError","too_many_state_changes":"#/components/schemas/TooManyStateChangesError","duplicate_origin_identifier":"#/components/schemas/DuplicateOriginIdentifierError","active_requires_display_name":"#/components/schemas/ActiveRequiresDisplayNameError","invalid_origin_identifier":"#/components/schemas/InvalidOriginIdentifierError","spark_details_on_derived_variable":"#/components/schemas/SparkDetailsOnDerivedVariableError","data_type_change_requires_inactive":"#/components/schemas/DataTypeChangeRequiresInactiveError","data_type_change_on_transformed_variable":"#/components/schemas/DataTypeChangeOnTransformedVariableError","scaling_factor_unsupported_for_data_type":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}}},{"$ref":"#/components/schemas/UnknownVariableError"}],"title":"Response 400 Create Variable V2 Variables Post"}}}},"404":{"description":"The `data_source` is unknown or not the caller's customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"A variable already exists for the `(data_source, origin_identifier)`; it was not modified. The body carries its `uuid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableCreateConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Bulk Register Variables

> Bulk-create SPARK variables (may span data sources). Create-only: existing\
> variables are reported but never modified. Returns one outcome per input item,\
> in input order.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Variables"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"BulkRegisterVariablesRequest":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CreateVariableItem"},"type":"array","maxItems":1000,"minItems":1,"title":"Data","description":"The variables to create."}},"type":"object","required":["data"],"title":"BulkRegisterVariablesRequest"},"CreateVariableItem":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"details":{"oneOf":[{"$ref":"#/components/schemas/CreateSparkVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"spark":"#/components/schemas/CreateSparkVariableDetails"}}}},"type":"object","required":["data_type","details"],"title":"CreateVariableItem"},"VariableDataType":{"type":"string","enum":["FLOAT","INTEGER","STRING","BOOLEAN","ARRAY_FLOAT","ARRAY_INTEGER","ARRAY_STRING","ARRAY_BOOLEAN"],"title":"VariableDataType"},"CreateSparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"oneOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. Only S7, S7Plus and Modbus data sources can be written; the identifier must match the data source's protocol family.","discriminator":{"propertyName":"type","mapping":{"modbus":"#/components/schemas/ModbusOriginIdentifier","s7":"#/components/schemas/S7OriginIdentifier","s7plus":"#/components/schemas/S7PlusOriginIdentifier"}}},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"anyOf":[{"$ref":"#/components/schemas/VariableCapturingState"},{"type":"null"}],"description":"Capturing state to create the variable in. Omit to use the default (`inactive`). Creating a variable `active` requires a non-empty `display_name`."}},"type":"object","required":["type","data_source","origin_identifier"],"title":"CreateSparkVariableDetails"},"S7OriginIdentifier":{"properties":{"type":{"type":"string","const":"s7","title":"Type","default":"s7"},"code":{"type":"string","title":"Code","description":"S7 address: an area prefix (`DB<n>:`, `I`, `Q`, `M`, or the S7-200 `V` alias for `DB1`), an optional size marker (`B`/`W`/`D`), a byte offset, and an optional `.<bit>` suffix, e.g. `DB400:12`, `MW2`, `I0.1`."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/StaticS7DataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"PLC data type: one of `BOOL`, `CHAR`, `BYTE`, `INT`, `DINT`, `WORD`, `DWORD`, `REAL`, `STRING` or a capped `STRING[n]` (n = byte length)."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7VariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."}},"type":"object","required":["code","data_type"],"title":"S7OriginIdentifier"},"StaticS7DataType":{"type":"string","enum":["BOOL","CHAR","BYTE","INT","DINT","WORD","DWORD","REAL","STRING"],"title":"StaticS7DataType"},"S7VariableHint":{"type":"string","enum":["ignore_length"],"title":"S7VariableHint"},"S7PlusOriginIdentifier":{"properties":{"type":{"type":"string","const":"s7plus","title":"Type","default":"s7plus"},"code":{"type":"string","title":"Code","description":"S7Plus symbolic access code, e.g. `Input15` or `DB30:90:2`."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7PlusVariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."},"unoptimized_type":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/S7PlusUnoptimizedType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"},{"type":"string","pattern":"(?i)^WSTRING\\[(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)\\]$"}],"description":"How the raw value read from this S7Plus variable is interpreted: a scalar type (`Char`, `Int`, `Real`, …) or a capped `String[n]` / `WString[n]`."},{"type":"null"}],"title":"Unoptimized Type"}},"type":"object","required":["code"],"title":"S7PlusOriginIdentifier"},"S7PlusVariableHint":{"type":"string","enum":["string","ignore_length"],"title":"S7PlusVariableHint"},"S7PlusUnoptimizedType":{"type":"string","enum":["Char","Byte","Int","Word","DInt","DWord","Real","Bool","Date","LInt","ULInt","USInt","UInt","UDInt","LReal","LTime","LDT","DTL","WChar"],"title":"S7PlusUnoptimizedType"},"ModbusOriginIdentifier":{"properties":{"type":{"type":"string","const":"modbus","title":"Type","default":"modbus"},"slave_id":{"type":"integer","maximum":255,"minimum":0,"title":"Slave Id","description":"Modbus slave/unit id."},"address":{"type":"integer","maximum":65535,"minimum":0,"title":"Address","description":"Register address."},"register_type":{"$ref":"#/components/schemas/ModbusRegisterType","description":"Which Modbus register table."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/ModbusDataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"Register data type: one of `BOOL`, `INT16`, `INT32BE`, `INT32LE`, `INT64BE`, `INT64LE`, `UINT16`, `UINT32BE`, `UINT32LE`, `UINT64BE`, `UINT64LE`, `FLOAT32BE`, `FLOAT32LE`, `FLOAT64BE`, `FLOAT64LE`, or a capped `STRING[n]` (n = byte length)."}},"type":"object","required":["slave_id","address","register_type","data_type"],"title":"ModbusOriginIdentifier"},"ModbusRegisterType":{"type":"string","enum":["coil","input","holding","discrete_input"],"title":"ModbusRegisterType"},"ModbusDataType":{"type":"string","enum":["BOOL","INT16","INT32BE","INT32LE","INT64BE","INT64LE","UINT16","UINT32BE","UINT32LE","UINT64BE","UINT64LE","FLOAT32BE","FLOAT32LE","FLOAT64BE","FLOAT64LE"],"title":"ModbusDataType"},"VariableCapturingState":{"type":"string","enum":["inactive","active","evaluating"],"title":"VariableCapturingState"},"BulkRegisterVariablesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VariableOutcome"},"type":"array","title":"Data","description":"One outcome per requested variable, in input order."}},"type":"object","required":["data"],"title":"BulkRegisterVariablesResponse"},"VariableOutcome":{"properties":{"outcome":{"$ref":"#/components/schemas/VariableOutcomeKind","description":"What happened to this item."},"data":{"$ref":"#/components/schemas/VariableResponse","description":"The variable's current state."}},"type":"object","required":["outcome","data"],"title":"VariableOutcome"},"VariableOutcomeKind":{"type":"string","enum":["created","already_exists","conflict"],"title":"VariableOutcomeKind"},"VariableResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier of the variable."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The machine the variable is associated with."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"type":{"$ref":"#/components/schemas/VariableType","description":"Deprecated; use `details.type`, which this mirrors.","default":"spark","deprecated":true},"details":{"oneOf":[{"$ref":"#/components/schemas/SparkVariableDetails"},{"$ref":"#/components/schemas/DerivedVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"derived":"#/components/schemas/DerivedVariableDetails","spark":"#/components/schemas/SparkVariableDetails"}}}},"type":"object","required":["uuid","machine","data_type","details"],"title":"VariableResponse"},"VariableType":{"type":"string","enum":["spark","derived"],"title":"VariableType"},"SparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type","default":"spark"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"anyOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"},{"additionalProperties":true,"type":"object"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. S7, S7Plus and Modbus data sources get a typed shape; any other protocol family falls back to a verbatim object."},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"$ref":"#/components/schemas/VariableCapturingState","description":"Current capturing state."}},"type":"object","required":["data_source","origin_identifier","state"],"title":"SparkVariableDetails"},"DerivedVariableDetails":{"properties":{"type":{"type":"string","const":"derived","title":"Type","default":"derived"},"dependencies":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Dependencies","description":"The variables this derived variable is computed from."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"How the variable is computed."}},"type":"object","title":"DerivedVariableDetails"},"ReadoutLimitExceededError":{"properties":{"type":{"type":"string","const":"readout_limit_exceeded","title":"Type","default":"readout_limit_exceeded"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source whose read-out capacity was exceeded."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["data_source","limit"],"title":"ReadoutLimitExceededError"},"TooManyStateChangesError":{"properties":{"type":{"type":"string","const":"too_many_state_changes","title":"Type","default":"too_many_state_changes"},"requested":{"type":"integer","title":"Requested","description":"Number of items in the request carrying a state change."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["requested","limit"],"title":"TooManyStateChangesError"},"DuplicateOriginIdentifierError":{"properties":{"type":{"type":"string","const":"duplicate_origin_identifier","title":"Type","default":"duplicate_origin_identifier"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the identifier is duplicated within."}},"additionalProperties":true,"type":"object","required":["index","data_source"],"title":"DuplicateOriginIdentifierError"},"ActiveRequiresDisplayNameError":{"properties":{"type":{"type":"string","const":"active_requires_display_name","title":"Type","default":"active_requires_display_name"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"ActiveRequiresDisplayNameError"},"InvalidOriginIdentifierError":{"properties":{"type":{"type":"string","const":"invalid_origin_identifier","title":"Type","default":"invalid_origin_identifier"},"reason":{"$ref":"#/components/schemas/InvalidOriginIdentifierReason","description":"Coarse category of why the identifier was rejected."},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","required":["reason"],"title":"InvalidOriginIdentifierError"},"InvalidOriginIdentifierReason":{"type":"string","enum":["malformed","family_mismatch","data_type_mismatch"],"title":"InvalidOriginIdentifierReason"},"SparkDetailsOnDerivedVariableError":{"properties":{"type":{"type":"string","const":"spark_details_on_derived_variable","title":"Type","default":"spark_details_on_derived_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"SparkDetailsOnDerivedVariableError"},"DataTypeChangeRequiresInactiveError":{"properties":{"type":{"type":"string","const":"data_type_change_requires_inactive","title":"Type","default":"data_type_change_requires_inactive"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeRequiresInactiveError"},"DataTypeChangeOnTransformedVariableError":{"properties":{"type":{"type":"string","const":"data_type_change_on_transformed_variable","title":"Type","default":"data_type_change_on_transformed_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeOnTransformedVariableError"},"ScalingFactorUnsupportedForDataTypeError":{"properties":{"type":{"type":"string","const":"scaling_factor_unsupported_for_data_type","title":"Type","default":"scaling_factor_unsupported_for_data_type"},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","title":"ScalingFactorUnsupportedForDataTypeError"},"UnknownVariableError":{"properties":{"type":{"type":"string","title":"Type","description":"Identifies the specific error.","default":"unknown"}},"additionalProperties":true,"type":"object","title":"UnknownVariableError"},"NotFoundError":{"properties":{"msg":{"type":"string","const":"not found","title":"Msg","default":"not found"}},"type":"object","title":"NotFoundError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/variables/bulk":{"post":{"tags":["Variables"],"summary":"Bulk Register Variables","description":"Bulk-create SPARK variables (may span data sources). Create-only: existing\nvariables are reported but never modified. Returns one outcome per input item,\nin input order.","operationId":"bulk_register_variables_v2_variables_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRegisterVariablesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRegisterVariablesResponse"}}}},"400":{"description":"The request was rejected on a business rule and nothing was created. The error carries the offending item's `index` where applicable. (`422` is used for request-shape validation.)","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ReadoutLimitExceededError"},{"$ref":"#/components/schemas/TooManyStateChangesError"},{"$ref":"#/components/schemas/DuplicateOriginIdentifierError"},{"$ref":"#/components/schemas/ActiveRequiresDisplayNameError"},{"$ref":"#/components/schemas/InvalidOriginIdentifierError"},{"$ref":"#/components/schemas/SparkDetailsOnDerivedVariableError"},{"$ref":"#/components/schemas/DataTypeChangeRequiresInactiveError"},{"$ref":"#/components/schemas/DataTypeChangeOnTransformedVariableError"},{"$ref":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}],"discriminator":{"propertyName":"type","mapping":{"readout_limit_exceeded":"#/components/schemas/ReadoutLimitExceededError","too_many_state_changes":"#/components/schemas/TooManyStateChangesError","duplicate_origin_identifier":"#/components/schemas/DuplicateOriginIdentifierError","active_requires_display_name":"#/components/schemas/ActiveRequiresDisplayNameError","invalid_origin_identifier":"#/components/schemas/InvalidOriginIdentifierError","spark_details_on_derived_variable":"#/components/schemas/SparkDetailsOnDerivedVariableError","data_type_change_requires_inactive":"#/components/schemas/DataTypeChangeRequiresInactiveError","data_type_change_on_transformed_variable":"#/components/schemas/DataTypeChangeOnTransformedVariableError","scaling_factor_unsupported_for_data_type":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}}},{"$ref":"#/components/schemas/UnknownVariableError"}],"title":"Response 400 Bulk Register Variables V2 Variables Bulk Post"}}}},"404":{"description":"A `data_source` is unknown or not the caller's customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Bulk Update Variables

> Batch-update variables addressed by \`uuid\`, transactionally: context\
> (\`display\_name\`, \`unit\`, \`scaling\_factor\`, \`comment\`) on any variable, plus\
> \`data\_type\` and \`details\` (state, origin) on SPARK variables. A field that is\
> omitted is left unchanged; nullable fields clear on an explicit \`null\`.\
> All-or-nothing — a single invalid item rejects the whole request and changes\
> nothing. Returns the updated variables in input order.\
> \
> A batch-update request may contain at most 100 state changes.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Variables"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"BulkUpdateVariablesRequest":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PatchVariable"},"type":"array","maxItems":1000,"minItems":1,"title":"Data","description":"The variables to update."}},"type":"object","required":["data"],"title":"BulkUpdateVariablesRequest"},"PatchVariable":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier of the variable to update."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform; `null` clears it (but a variable that is not `inactive` must keep a non-empty name)."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values; `null` clears it."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts; `null` clears it. Only supported for numeric data types."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable; `null` clears it."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values; changeable only while the variable is `inactive`."},"details":{"oneOf":[{"$ref":"#/components/schemas/PatchSparkVariableDetails"}],"title":"Details","description":"Variable type specific fields to update.","discriminator":{"propertyName":"type","mapping":{"spark":"#/components/schemas/PatchSparkVariableDetails"}}}},"type":"object","required":["uuid"],"title":"PatchVariable"},"VariableDataType":{"type":"string","enum":["FLOAT","INTEGER","STRING","BOOLEAN","ARRAY_FLOAT","ARRAY_INTEGER","ARRAY_STRING","ARRAY_BOOLEAN"],"title":"VariableDataType"},"PatchSparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type"},"state":{"$ref":"#/components/schemas/VariableCapturingState","description":"Capturing state to transition the variable to. Activating a variable requires it to have a non-empty `display_name`. At most 100 items per request may change state."},"origin_identifier":{"oneOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source; only S7, S7Plus and Modbus are writable, and it must match the data source's protocol family and stay unique within the data source.","discriminator":{"propertyName":"type","mapping":{"modbus":"#/components/schemas/ModbusOriginIdentifier","s7":"#/components/schemas/S7OriginIdentifier","s7plus":"#/components/schemas/S7PlusOriginIdentifier"}}},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source; `null` clears it."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source; `null` clears it."}},"type":"object","required":["type"],"title":"PatchSparkVariableDetails"},"VariableCapturingState":{"type":"string","enum":["inactive","active","evaluating"],"title":"VariableCapturingState"},"S7OriginIdentifier":{"properties":{"type":{"type":"string","const":"s7","title":"Type","default":"s7"},"code":{"type":"string","title":"Code","description":"S7 address: an area prefix (`DB<n>:`, `I`, `Q`, `M`, or the S7-200 `V` alias for `DB1`), an optional size marker (`B`/`W`/`D`), a byte offset, and an optional `.<bit>` suffix, e.g. `DB400:12`, `MW2`, `I0.1`."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/StaticS7DataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"PLC data type: one of `BOOL`, `CHAR`, `BYTE`, `INT`, `DINT`, `WORD`, `DWORD`, `REAL`, `STRING` or a capped `STRING[n]` (n = byte length)."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7VariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."}},"type":"object","required":["code","data_type"],"title":"S7OriginIdentifier"},"StaticS7DataType":{"type":"string","enum":["BOOL","CHAR","BYTE","INT","DINT","WORD","DWORD","REAL","STRING"],"title":"StaticS7DataType"},"S7VariableHint":{"type":"string","enum":["ignore_length"],"title":"S7VariableHint"},"S7PlusOriginIdentifier":{"properties":{"type":{"type":"string","const":"s7plus","title":"Type","default":"s7plus"},"code":{"type":"string","title":"Code","description":"S7Plus symbolic access code, e.g. `Input15` or `DB30:90:2`."},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7PlusVariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."},"unoptimized_type":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/S7PlusUnoptimizedType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"},{"type":"string","pattern":"(?i)^WSTRING\\[(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)\\]$"}],"description":"How the raw value read from this S7Plus variable is interpreted: a scalar type (`Char`, `Int`, `Real`, …) or a capped `String[n]` / `WString[n]`."},{"type":"null"}],"title":"Unoptimized Type"}},"type":"object","required":["code"],"title":"S7PlusOriginIdentifier"},"S7PlusVariableHint":{"type":"string","enum":["string","ignore_length"],"title":"S7PlusVariableHint"},"S7PlusUnoptimizedType":{"type":"string","enum":["Char","Byte","Int","Word","DInt","DWord","Real","Bool","Date","LInt","ULInt","USInt","UInt","UDInt","LReal","LTime","LDT","DTL","WChar"],"title":"S7PlusUnoptimizedType"},"ModbusOriginIdentifier":{"properties":{"type":{"type":"string","const":"modbus","title":"Type","default":"modbus"},"slave_id":{"type":"integer","maximum":255,"minimum":0,"title":"Slave Id","description":"Modbus slave/unit id."},"address":{"type":"integer","maximum":65535,"minimum":0,"title":"Address","description":"Register address."},"register_type":{"$ref":"#/components/schemas/ModbusRegisterType","description":"Which Modbus register table."},"data_type":{"anyOf":[{"$ref":"#/components/schemas/ModbusDataType"},{"type":"string","pattern":"(?i)^STRING\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\]$"}],"title":"Data Type","description":"Register data type: one of `BOOL`, `INT16`, `INT32BE`, `INT32LE`, `INT64BE`, `INT64LE`, `UINT16`, `UINT32BE`, `UINT32LE`, `UINT64BE`, `UINT64LE`, `FLOAT32BE`, `FLOAT32LE`, `FLOAT64BE`, `FLOAT64LE`, or a capped `STRING[n]` (n = byte length)."}},"type":"object","required":["slave_id","address","register_type","data_type"],"title":"ModbusOriginIdentifier"},"ModbusRegisterType":{"type":"string","enum":["coil","input","holding","discrete_input"],"title":"ModbusRegisterType"},"ModbusDataType":{"type":"string","enum":["BOOL","INT16","INT32BE","INT32LE","INT64BE","INT64LE","UINT16","UINT32BE","UINT32LE","UINT64BE","UINT64LE","FLOAT32BE","FLOAT32LE","FLOAT64BE","FLOAT64LE"],"title":"ModbusDataType"},"BulkUpdateVariablesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VariableResponse"},"type":"array","title":"Data","description":"One updated variable per request item, in input order."}},"type":"object","required":["data"],"title":"BulkUpdateVariablesResponse"},"VariableResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier of the variable."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The machine the variable is associated with."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values."},"scaling_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scaling Factor","description":"Multiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Free-form comment stored with the variable."},"data_type":{"$ref":"#/components/schemas/VariableDataType","description":"Data type of the captured values."},"type":{"$ref":"#/components/schemas/VariableType","description":"Deprecated; use `details.type`, which this mirrors.","default":"spark","deprecated":true},"details":{"oneOf":[{"$ref":"#/components/schemas/SparkVariableDetails"},{"$ref":"#/components/schemas/DerivedVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"derived":"#/components/schemas/DerivedVariableDetails","spark":"#/components/schemas/SparkVariableDetails"}}}},"type":"object","required":["uuid","machine","data_type","details"],"title":"VariableResponse"},"VariableType":{"type":"string","enum":["spark","derived"],"title":"VariableType"},"SparkVariableDetails":{"properties":{"type":{"type":"string","const":"spark","title":"Type","default":"spark"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the variable is read from."},"origin_identifier":{"anyOf":[{"$ref":"#/components/schemas/S7OriginIdentifier"},{"$ref":"#/components/schemas/S7PlusOriginIdentifier"},{"$ref":"#/components/schemas/ModbusOriginIdentifier"},{"additionalProperties":true,"type":"object"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. S7, S7Plus and Modbus data sources get a typed shape; any other protocol family falls back to a verbatim object."},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source."},"origin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Comment","description":"Comment as reported by the data source."},"state":{"$ref":"#/components/schemas/VariableCapturingState","description":"Current capturing state."}},"type":"object","required":["data_source","origin_identifier","state"],"title":"SparkVariableDetails"},"DerivedVariableDetails":{"properties":{"type":{"type":"string","const":"derived","title":"Type","default":"derived"},"dependencies":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Dependencies","description":"The variables this derived variable is computed from."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"How the variable is computed."}},"type":"object","title":"DerivedVariableDetails"},"ReadoutLimitExceededError":{"properties":{"type":{"type":"string","const":"readout_limit_exceeded","title":"Type","default":"readout_limit_exceeded"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source whose read-out capacity was exceeded."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["data_source","limit"],"title":"ReadoutLimitExceededError"},"TooManyStateChangesError":{"properties":{"type":{"type":"string","const":"too_many_state_changes","title":"Type","default":"too_many_state_changes"},"requested":{"type":"integer","title":"Requested","description":"Number of items in the request carrying a state change."},"limit":{"type":"integer","title":"Limit","description":"The limit that was exceeded; see `type` for which limit."}},"additionalProperties":true,"type":"object","required":["requested","limit"],"title":"TooManyStateChangesError"},"DuplicateOriginIdentifierError":{"properties":{"type":{"type":"string","const":"duplicate_origin_identifier","title":"Type","default":"duplicate_origin_identifier"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source the identifier is duplicated within."}},"additionalProperties":true,"type":"object","required":["index","data_source"],"title":"DuplicateOriginIdentifierError"},"ActiveRequiresDisplayNameError":{"properties":{"type":{"type":"string","const":"active_requires_display_name","title":"Type","default":"active_requires_display_name"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"ActiveRequiresDisplayNameError"},"InvalidOriginIdentifierError":{"properties":{"type":{"type":"string","const":"invalid_origin_identifier","title":"Type","default":"invalid_origin_identifier"},"reason":{"$ref":"#/components/schemas/InvalidOriginIdentifierReason","description":"Coarse category of why the identifier was rejected."},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","required":["reason"],"title":"InvalidOriginIdentifierError"},"InvalidOriginIdentifierReason":{"type":"string","enum":["malformed","family_mismatch","data_type_mismatch"],"title":"InvalidOriginIdentifierReason"},"SparkDetailsOnDerivedVariableError":{"properties":{"type":{"type":"string","const":"spark_details_on_derived_variable","title":"Type","default":"spark_details_on_derived_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"SparkDetailsOnDerivedVariableError"},"DataTypeChangeRequiresInactiveError":{"properties":{"type":{"type":"string","const":"data_type_change_requires_inactive","title":"Type","default":"data_type_change_requires_inactive"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeRequiresInactiveError"},"DataTypeChangeOnTransformedVariableError":{"properties":{"type":{"type":"string","const":"data_type_change_on_transformed_variable","title":"Type","default":"data_type_change_on_transformed_variable"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."}},"additionalProperties":true,"type":"object","required":["index"],"title":"DataTypeChangeOnTransformedVariableError"},"ScalingFactorUnsupportedForDataTypeError":{"properties":{"type":{"type":"string","const":"scaling_factor_unsupported_for_data_type","title":"Type","default":"scaling_factor_unsupported_for_data_type"},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","title":"ScalingFactorUnsupportedForDataTypeError"},"UnknownVariableError":{"properties":{"type":{"type":"string","title":"Type","description":"Identifies the specific error.","default":"unknown"}},"additionalProperties":true,"type":"object","title":"UnknownVariableError"},"NotFoundError":{"properties":{"msg":{"type":"string","const":"not found","title":"Msg","default":"not found"}},"type":"object","title":"NotFoundError"},"DependentDerivedVariablesError":{"properties":{"type":{"type":"string","const":"dependent_derived_variables","title":"Type","default":"dependent_derived_variables"},"index":{"type":"integer","title":"Index","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},"dependents":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Dependents","description":"The derived variables that depend on the variable and block its deactivation."}},"additionalProperties":true,"type":"object","required":["index","dependents"],"title":"DependentDerivedVariablesError"},"DowntimeConfigDependencyError":{"properties":{"type":{"type":"string","const":"downtime_config_dependency","title":"Type","default":"downtime_config_dependency"},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","title":"DowntimeConfigDependencyError"},"ThroughputConfigDependencyError":{"properties":{"type":{"type":"string","const":"throughput_config_dependency","title":"Type","default":"throughput_config_dependency"},"index":{"anyOf":[{"type":"integer","description":"0-based position of the offending item in the request `data` array — the correlation key back to the input."},{"type":"null"}],"title":"Index"}},"additionalProperties":true,"type":"object","title":"ThroughputConfigDependencyError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/variables/bulk":{"patch":{"tags":["Variables"],"summary":"Bulk Update Variables","description":"Batch-update variables addressed by `uuid`, transactionally: context\n(`display_name`, `unit`, `scaling_factor`, `comment`) on any variable, plus\n`data_type` and `details` (state, origin) on SPARK variables. A field that is\nomitted is left unchanged; nullable fields clear on an explicit `null`.\nAll-or-nothing — a single invalid item rejects the whole request and changes\nnothing. Returns the updated variables in input order.\n\nA batch-update request may contain at most 100 state changes.","operationId":"bulk_update_variables_v2_variables_bulk_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateVariablesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateVariablesResponse"}}}},"400":{"description":"The request was rejected on a business rule and nothing was changed. The error carries the offending item's `index` where applicable. (`422` is used for request-shape validation.)","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ReadoutLimitExceededError"},{"$ref":"#/components/schemas/TooManyStateChangesError"},{"$ref":"#/components/schemas/DuplicateOriginIdentifierError"},{"$ref":"#/components/schemas/ActiveRequiresDisplayNameError"},{"$ref":"#/components/schemas/InvalidOriginIdentifierError"},{"$ref":"#/components/schemas/SparkDetailsOnDerivedVariableError"},{"$ref":"#/components/schemas/DataTypeChangeRequiresInactiveError"},{"$ref":"#/components/schemas/DataTypeChangeOnTransformedVariableError"},{"$ref":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}],"discriminator":{"propertyName":"type","mapping":{"readout_limit_exceeded":"#/components/schemas/ReadoutLimitExceededError","too_many_state_changes":"#/components/schemas/TooManyStateChangesError","duplicate_origin_identifier":"#/components/schemas/DuplicateOriginIdentifierError","active_requires_display_name":"#/components/schemas/ActiveRequiresDisplayNameError","invalid_origin_identifier":"#/components/schemas/InvalidOriginIdentifierError","spark_details_on_derived_variable":"#/components/schemas/SparkDetailsOnDerivedVariableError","data_type_change_requires_inactive":"#/components/schemas/DataTypeChangeRequiresInactiveError","data_type_change_on_transformed_variable":"#/components/schemas/DataTypeChangeOnTransformedVariableError","scaling_factor_unsupported_for_data_type":"#/components/schemas/ScalingFactorUnsupportedForDataTypeError"}}},{"$ref":"#/components/schemas/UnknownVariableError"}],"title":"Response 400 Bulk Update Variables V2 Variables Bulk Patch"}}}},"404":{"description":"An addressed variable `uuid` is unknown or not the caller's customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"A requested state change conflicts with something that still depends on the variable; nothing was changed.","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DependentDerivedVariablesError"},{"$ref":"#/components/schemas/DowntimeConfigDependencyError"},{"$ref":"#/components/schemas/ThroughputConfigDependencyError"}],"discriminator":{"propertyName":"type","mapping":{"dependent_derived_variables":"#/components/schemas/DependentDerivedVariablesError","downtime_config_dependency":"#/components/schemas/DowntimeConfigDependencyError","throughput_config_dependency":"#/components/schemas/ThroughputConfigDependencyError"}}},{"$ref":"#/components/schemas/UnknownVariableError"}],"title":"Response 409 Bulk Update Variables V2 Variables Bulk Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
