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.
Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected.
1000Successful Response
Validation Error
GET /api/v2/variables HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"machine": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "spark",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"code": "MW2",
"data_type": "REAL"
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}
],
"metadata": {
"next_cursor": "text"
}
}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.
Human-readable name shown to users in the platform.
Barrel TemperatureUnit of measure of the values.
°CMultiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not.
0.1Free-form comment stored with the variable.
Data type of the captured values.
FLOATMögliche Werte: Successful Response
Unique identifier of the variable.
The machine the variable is associated with.
Human-readable name shown to users in the platform.
Barrel TemperatureUnit of measure of the values.
°CMultiplier applied to raw readouts. A numeric variable needs one to be usable in analyses; string and boolean variables do not.
0.1Free-form comment stored with the variable.
Data type of the captured values.
FLOATMögliche Werte: Deprecated; use details.type, which this mirrors.
sparkMögliche Werte: 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.)
The data_source is unknown or not the caller's customer.
A variable already exists for the (data_source, origin_identifier); it was not modified. The body carries its uuid.
Validation Error
POST /api/v2/variables HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 362
{
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "text",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"type": "s7",
"code": "DB400:12",
"data_type": "DINT",
"hints": [
"ignore_length"
]
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"machine": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "spark",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"code": "MW2",
"data_type": "REAL"
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}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.
Successful Response
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.)
A data_source is unknown or not the caller's customer.
Validation Error
POST /api/v2/variables/bulk HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 373
{
"data": [
{
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "text",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"type": "s7",
"code": "DB400:12",
"data_type": "DINT",
"hints": [
"ignore_length"
]
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}
]
}{
"data": [
{
"outcome": "created",
"data": {
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"machine": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "spark",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"code": "MW2",
"data_type": "REAL"
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}
}
]
}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.
Successful Response
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.)
An addressed variable uuid is unknown or not the caller's customer.
A requested state change conflicts with something that still depends on the variable; nothing was changed.
Validation Error
PATCH /api/v2/variables/bulk HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 366
{
"data": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "text",
"state": "inactive",
"origin_identifier": {
"type": "s7",
"code": "DB400:12",
"data_type": "DINT",
"hints": [
"ignore_length"
]
},
"origin_name": "Temperature_Actual",
"origin_comment": "text"
}
}
]
}{
"data": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"machine": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "Barrel Temperature",
"unit": "°C",
"scaling_factor": 0.1,
"comment": "text",
"data_type": "FLOAT",
"details": {
"type": "spark",
"data_source": "123e4567-e89b-12d3-a456-426614174000",
"origin_identifier": {
"code": "MW2",
"data_type": "REAL"
},
"origin_name": "Temperature_Actual",
"origin_comment": "text",
"state": "inactive"
}
}
]
}Zuletzt aktualisiert