{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"paths":{"/v2/machines":{"get":{"tags":["Machines"],"summary":"Get Machines","description":"Returns a list of machines in your organization.","operationId":"get_machines_v2_machines_get","security":[{"Bearer":[]}],"parameters":[{"name":"site","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 site UUIDs."}},{"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/PaginatedMachines"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Machines"],"summary":"Create Machine","description":"Create a new machine.","operationId":"create_machine_v2_machines_post","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/machines/{uuid}":{"get":{"tags":["Machines"],"summary":"Get Machine","description":"Returns details for a specific machine.","operationId":"get_machine_v2_machines__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the machine to retrieve."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Machines"],"summary":"Update Machine","description":"Update a machine.","operationId":"update_machine_v2_machines__uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the machine to update."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/machines/{machine_uuid}":{"delete":{"tags":["Machines"],"summary":"Delete Machine","description":"Delete a machine","operationId":"delete_machine_v2_machines__machine_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"machine_uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the machine."}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/machines/{uuid}/productivity-metrics":{"post":{"tags":["Machines"],"summary":"Productivity Metrics","description":"Get productivity metrics for a specific machine over a set of datetime ranges.","operationId":"productivity_metrics_v2_machines__uuid__productivity_metrics_post","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the machine to retrieve productivity metrics for."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_productivity_metrics_v2_machines__uuid__productivity_metrics_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductivityMetrics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/sites/{uuid}":{"get":{"tags":["Sites"],"summary":"Get Site","description":"Returns details for a specific site.","operationId":"get_site_v2_sites__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the site."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Sites"],"summary":"Update Site","description":"Update details of a specific site.","operationId":"update_site_v2_sites__uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the site."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Sites"],"summary":"Delete Site","description":"Delete a site","operationId":"delete_site_v2_sites__uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the site."}}],"responses":{"204":{"description":"Site successfully deleted."},"400":{"description":"Returned e.g. when the Site has SPARKs associated with it."},"404":{"description":"Site not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/sites":{"post":{"tags":["Sites"],"summary":"Create Site","description":"Create a site.","operationId":"create_site_v2_sites_post","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSiteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Sites"],"summary":"Get Sites","description":"Returns a list of physical production sites available in your organization.","operationId":"get_sites_v2_sites_get","security":[{"Bearer":[]}],"parameters":[{"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/PaginatedSites"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/timeseries":{"post":{"tags":["Timeseries"],"summary":"Get timeseries data","description":"Returns paginated timeseries data for one or more variables **of the same machine**\nin a tabular structure, where the first column always represents the timestamp of a row\nand the following columns hold the variables' data for the given timestamp:\ne.g. `[time, variable_uuid_1, variable_uuid_2, variable_uuid_3]`.\n\n**Note**: The sequence of variables from the request is preserved in the response:\n\nA request for `?variables=A,B` will yield response data with columns `[time, A, B]`,\nwhereas `?variables=B,A` will yield response data with columns `[time, B, A]`.","operationId":"timeseries_v2_timeseries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesParams"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Bearer":[]}]}},"/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","security":[{"Bearer":[]}],"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"}}}}}},"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","security":[{"Bearer":[]}],"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"}}}},"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"}}}},"404":{"description":"The `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"}}}}}}},"/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"}}}}},"security":[{"Bearer":[]}]},"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.","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"}}}},"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"}}}},"404":{"description":"An addressed variable `uuid` 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"}}}}},"security":[{"Bearer":[]}]}},"/v2/production-runs":{"get":{"tags":["Production Runs"],"summary":"Get Production Runs","description":"Returns a list of all production runs in your organization.","operationId":"get_production_runs_v2_production_runs_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"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.","description":"If not set, production runs for all machines will be considered."},"description":"If not set, production runs for all machines will be considered."},{"name":"product-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a product.","description":"If not set, all products will be considered.","examples":["301292","Prod1"]},"description":"If not set, all products will be considered."},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Filter by product UUID","description":"If not set, all products will be considered.","examples":["4646d168-a98b-447e-834a-d36dd1f33eb4"]},"description":"If not set, all products will be considered."},{"name":"production-order-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a production order.","description":"If not set, all production orders will be considered.","examples":["FA1"]},"description":"If not set, all production orders will be considered."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, starting from","description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed.","examples":["2023-07-19T19:39:46.735269+02:00"]},"description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, up to","description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},"description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},{"name":"uuid","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 production run UUIDs.","description":"If not set, production runs for all UUIDs will be considered."},"description":"If not set, production runs for all UUIDs will be considered."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(?P<product_external_id>product-external-id:)(?P<product_external_id_value>.*)|^(?P<production_order_external_id>production-order-external-id:)(?P<production_order_external_id_value>.*)"},{"type":"null"}],"title":"Search query","description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-external-id:` prefixes to specify the field to search in. ","examples":["product-external-id:301292","production-external-id:FA1"]},"description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-external-id:` prefixes to specify the field to search in. "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductionRuns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/production-runs/{uuid}":{"get":{"tags":["Production Runs"],"summary":"Get Production Run","description":"Returns details for a specific production run.","operationId":"get_production_run_v2_production_runs__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the production run."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/downtimes":{"get":{"tags":["Downtimes"],"summary":"Get Downtimes","description":"Returns a list of downtimes in your organization.","operationId":"get_downtimes_v2_downtimes_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"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.","description":"If not set, downtimes for all machines will be considered."},"description":"If not set, downtimes for all machines will be considered."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, starting from","description":"Only downtimes that were observed starting at `start` will be returned. If not set, no lower time bound will be assumed.","examples":["2023-07-19T19:39:46.735269+02:00"]},"description":"Only downtimes that were observed starting at `start` will be returned. If not set, no lower time bound will be assumed."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, up to","description":"Only downtimes that were observed up to `end` will be returned. If not set, no upper time bound will be assumed."},"description":"Only downtimes that were observed up to `end` will be returned. If not set, no upper time bound will be assumed."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDowntimes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/downtime-catalogs":{"get":{"tags":["Downtime Catalogs"],"summary":"Get Downtime Catalogs","description":"Returns a list of downtime catalogs in your organization.","operationId":"get_downtime_catalogs_v2_downtime_catalogs_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"uuid","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 downtime catalog UUIDs.","description":"If not set, all downtime catalogs will be considered."},"description":"If not set, all downtime catalogs will be considered."},{"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.","description":"Only return catalogs assigned to any of the given machines. If not set, catalogs for all machines (including unassigned catalogs) will be considered."},"description":"Only return catalogs assigned to any of the given machines. If not set, catalogs for all machines (including unassigned catalogs) will be considered."},{"name":"unassigned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Filter for unassigned catalogs","description":"If true, only return catalogs that are not assigned to any machine. If not set, return catalogs irrespective if they're assigned to a machine or not."},"description":"If true, only return catalogs that are not assigned to any machine. If not set, return catalogs irrespective if they're assigned to a machine or not."},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DowntimeCatalogState"},{"type":"null"}],"title":"Filter by lifecycle state.","description":"If not set, both active and archived catalogs will be returned."},"description":"If not set, both active and archived catalogs will be returned."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDowntimeCatalogs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-stability":"experimental"}},"/v2/downtime-catalogs/{uuid}":{"get":{"tags":["Downtime Catalogs"],"summary":"Get Downtime Catalog","description":"Returns details for a specific downtime catalog.","operationId":"get_downtime_catalog_v2_downtime_catalogs__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the downtime catalog."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeCatalog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-stability":"experimental"}},"/v2/downtime-reasons":{"get":{"tags":["Downtime Reasons"],"summary":"Get Downtime Reasons","description":"Returns a list of downtime reasons in your organization.","operationId":"get_downtime_reasons_v2_downtime_reasons_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"uuid","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 downtime reason UUIDs.","description":"If not set, all downtime reasons will be considered."},"description":"If not set, all downtime reasons will be considered."},{"name":"catalog","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 downtime catalog UUIDs.","description":"Only return reasons belonging to any of the given catalogs."},"description":"Only return reasons belonging to any of the given catalogs."},{"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.","description":"Only return reasons whose catalog is assigned to any of the given machines. If not set, reasons for all machines will be considered."},"description":"Only return reasons whose catalog is assigned to any of the given machines. If not set, reasons for all machines will be considered."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/DowntimeCategory"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more downtime categories.","description":"If not set, all categories will be considered."},"description":"If not set, all categories will be considered."},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DowntimeReasonState"},{"type":"null"}],"title":"Filter by lifecycle state.","description":"If not set, both active and archived reasons will be returned."},"description":"If not set, both active and archived reasons will be returned."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDowntimeReasons"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-stability":"experimental"},"post":{"tags":["Downtime Reasons"],"summary":"Create Downtime Reason","description":"Create a downtime reason within a catalog.","operationId":"create_downtime_reason_v2_downtime_reasons_post","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDowntimeReason"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogNotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonNameCollisionError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/downtime-reasons/{uuid}":{"get":{"tags":["Downtime Reasons"],"summary":"Get Downtime Reason","description":"Returns details for a specific downtime reason.","operationId":"get_downtime_reason_v2_downtime_reasons__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the downtime reason."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-stability":"experimental"},"patch":{"tags":["Downtime Reasons"],"summary":"Update Downtime Reason","description":"Update a downtime reason's name, description, or group.","operationId":"update_downtime_reason_v2_downtime_reasons__uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the downtime reason."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDowntimeReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonNotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonNameCollisionError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/products":{"get":{"tags":["Products"],"summary":"Get Products","description":"Returns a list of all products in your organization.","operationId":"get_products_v2_products_get","security":[{"Bearer":[]}],"parameters":[{"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/PaginatedProducts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/products/{uuid}":{"get":{"tags":["Products"],"summary":"Get Product","description":"Returns details for a specific product.","operationId":"get_product_v2_products__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the product."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/sparks":{"get":{"tags":["SPARKs"],"summary":"Get Sparks","description":"Returns a list of SPARKs in your organization.","operationId":"get_sparks_v2_sparks_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"uuid","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 SPARK UUIDs."}},{"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":"site","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 site UUIDs."}},{"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."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSparks"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/data-sources":{"get":{"tags":["Data Sources"],"summary":"Get Data Sources","description":"Returns a list of data sources in your organization.","operationId":"get_data_sources_v2_data_sources_get","security":[{"Bearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"uuid","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":"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":"spark","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 SPARK UUIDs."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataSources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Data Sources"],"summary":"Post Data Source","description":"Create a new data source","operationId":"post_data_source_v2_data_sources_post","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataSourceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/data-sources/{uuid}":{"get":{"tags":["Data Sources"],"summary":"Get Data Source","description":"Returns details for a specific data source.","operationId":"get_data_source_v2_data_sources__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the site."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/data-sources/{data_source_uuid}":{"patch":{"tags":["Data Sources"],"summary":"Update Data Source","description":"Update a data source","operationId":"update_data_source_v2_data_sources__data_source_uuid__patch","security":[{"Bearer":[]}],"parameters":[{"name":"data_source_uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the data source."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataSourceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Sources"],"summary":"Delete Data Source","description":"Delete a data source","operationId":"delete_data_source_v2_data_sources__data_source_uuid__delete","security":[{"Bearer":[]}],"parameters":[{"name":"data_source_uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the data source."}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/variable-discoveries/{uuid}":{"get":{"tags":["Variable Discoveries"],"summary":"Get Variable Discovery","description":"Returns details for a specific Variable Discovery.","operationId":"get_variable_discovery_v2_variable_discoveries__uuid__get","security":[{"Bearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the Variable Discovery."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableDiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/variable-discoveries":{"post":{"tags":["Variable Discoveries"],"summary":"Create Variable Discovery","description":"Start a Variable Discovery run on a data source.","operationId":"create_variable_discovery_v2_variable_discoveries_post","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableDiscoveryCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableDiscoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Variable Discoveries"],"summary":"Get Variable Discoveries","description":"Lists Variable Discovery resources","operationId":"get_variable_discoveries_v2_variable_discoveries_get","security":[{"Bearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/VariableDiscoveryState"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more Variable Discovery states."}},{"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 sources."}},{"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":"spark","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 SPARK UUIDs."}},{"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/PaginatedVariableDiscoveries"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"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"},"AllenBradleyDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":44818},"type":{"type":"string","const":"allen_bradley","title":"Type"}},"type":"object","required":["host","type"],"title":"AllenBradleyDetails"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"Body_productivity_metrics_v2_machines__uuid__productivity_metrics_post":{"properties":{"datetime_ranges":{"items":{"$ref":"#/components/schemas/DatetimeRange"},"type":"array","maxItems":31,"minItems":1,"title":"Datetime Ranges"},"cursor":{"type":"string","title":"Get page starting at cursor"}},"type":"object","required":["datetime_ranges"],"title":"Body_productivity_metrics_v2_machines__uuid__productivity_metrics_post"},"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"},"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"},"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"},"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"},"CatalogNotFoundError":{"properties":{"type":{"type":"string","const":"catalog_not_found","title":"Type","default":"catalog_not_found"}},"type":"object","title":"CatalogNotFoundError"},"ConflictingReason":{"properties":{"reason":{"type":"string","format":"uuid","title":"Conflicting Reason UUID"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Conflicting Reason State","description":"Lifecycle state of the conflicting reason."}},"type":"object","required":["reason","state"],"title":"ConflictingReason"},"ConnectionClosed":{"properties":{"type":{"type":"string","const":"CONNECTION_CLOSED","title":"Type"}},"type":"object","required":["type"],"title":"ConnectionClosed"},"ConnectionRefused":{"properties":{"type":{"type":"string","const":"CONNECTION_REFUSED","title":"Type"}},"type":"object","required":["type"],"title":"ConnectionRefused"},"ConnectionReset":{"properties":{"type":{"type":"string","const":"CONNECTION_RESET","title":"Type"}},"type":"object","required":["type"],"title":"ConnectionReset"},"CreateDataSourceRequest":{"properties":{"name":{"type":"string","title":"Name","description":"The human readable name of the data source."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"Which SPARK reads from the data source. It must be located at the same site as the current SPARK."},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer","description":"Manufacturer of the data source.","examples":["Siemens","ABB","OMRON"]},"device_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Model","description":"Specific model or name describing the data source as concretely as possible.","examples":["S7-1214C","PM556-TP-ETH","WinCC"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"General remarks concerning this data source."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"On which machine the data source is located."},"details":{"oneOf":[{"$ref":"#/components/schemas/AllenBradleyDetails"},{"$ref":"#/components/schemas/ModbusTcpDetails"},{"$ref":"#/components/schemas/S7PlusDetails"},{"$ref":"#/components/schemas/S7Details"},{"$ref":"#/components/schemas/KraussMaffeiDetails"},{"$ref":"#/components/schemas/FinsDetails"},{"$ref":"#/components/schemas/CreateEnlyzeGatewayDetails"},{"$ref":"#/components/schemas/CreateOdacDetails"},{"$ref":"#/components/schemas/CreateOpcUaDetails"},{"$ref":"#/components/schemas/CreatePlastcontrolDetails"}],"title":"Data Source Details","description":"Data Source specific properties required for the connection to the data source","discriminator":{"propertyName":"type","mapping":{"allen_bradley":"#/components/schemas/AllenBradleyDetails","enlyze_gateway":"#/components/schemas/CreateEnlyzeGatewayDetails","fins":"#/components/schemas/FinsDetails","krauss_maffei":"#/components/schemas/KraussMaffeiDetails","modbus_tcp":"#/components/schemas/ModbusTcpDetails","odac":"#/components/schemas/CreateOdacDetails","opcua":"#/components/schemas/CreateOpcUaDetails","plastcontrol":"#/components/schemas/CreatePlastcontrolDetails","s7":"#/components/schemas/S7Details","s7plus":"#/components/schemas/S7PlusDetails"}}}},"type":"object","required":["name","spark","machine","details"],"title":"CreateDataSourceRequest"},"CreateDowntimeReason":{"properties":{"catalog":{"type":"string","format":"uuid","title":"Downtime Catalog","description":"UUID of the active catalog to create the reason in."},"name":{"type":"string","minLength":1,"title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"One of: PLANNED, UNPLANNED, NOT_SCHEDULED, INVALID"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group","description":"Single-level, free-text group the reason belongs to."}},"type":"object","required":["catalog","name","category"],"title":"CreateDowntimeReason"},"CreateEnlyzeGatewayDetails":{"properties":{"host":{"type":"string","title":"Host","description":"Host or IP of the computer running the Enlyze Gateway"},"port":{"type":"integer","title":"Port","description":"The port of the Enlyze Gateway"},"protocol_details":{"anyOf":[{"$ref":"#/components/schemas/OpcDaProtocolDetails"},{"$ref":"#/components/schemas/PviProtocolDetails"}],"title":"Protocol Details"},"type":{"type":"string","const":"enlyze_gateway","title":"Type"}},"type":"object","required":["host","port","protocol_details","type"],"title":"CreateEnlyzeGatewayDetails"},"CreateOdacDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","maximum":65535.0,"minimum":0.0,"title":"Port","default":2020},"type":{"type":"string","const":"odac","title":"Type"}},"type":"object","required":["host","type"],"title":"CreateOdacDetails"},"CreateOpcUaDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"The OPC-UA endpoint including the `opc.tcp://` prefix, the host and port as well as the server path","examples":["opc.tcp://open.mtconnect.org:4980/sample_server"]},"security_settings":{"$ref":"#/components/schemas/OpcUaSecuritySettings"},"type":{"type":"string","const":"opcua","title":"Type"},"user_identity":{"oneOf":[{"$ref":"#/components/schemas/OpcUaAnonymousUserIdentity"},{"$ref":"#/components/schemas/OpcUaUsernamePasswordIdentity"}],"title":"User Identity","description":"The user identity to use. This can be a basic Username-Password identity or an anonymous identity implied by `Anonymous`.\nFor more background on user authentication check out the specification: https://opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User's%20Guide%20and%20Reference-QuickOPC/OPC%20UA%20User%20Authentication.html","discriminator":{"propertyName":"type","mapping":{"Anonymous":"#/components/schemas/OpcUaAnonymousUserIdentity","UserNamePassword":"#/components/schemas/OpcUaUsernamePasswordIdentity"}}}},"type":"object","required":["host","port","endpoint_url","security_settings","type","user_identity"],"title":"CreateOpcUaDetails"},"CreatePlastcontrolDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"type":{"type":"string","const":"plastcontrol","title":"Type"},"readout_mode":{"$ref":"#/components/schemas/PlastcontrolActive"}},"type":"object","required":["host","port","type","readout_mode"],"title":"CreatePlastcontrolDetails"},"CreateSiteRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateSiteRequest"},"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":{"additionalProperties":true,"type":"object","title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. Its shape is specific to the data source's protocol family (e.g. S7, Modbus); it is stored and returned verbatim.","examples":[{"code":"MW2","datatype":"REAL"},{"address":"v1"}]},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source.","examples":["Temperature_Actual"]},"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"},"CreateVariableItem":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-readable name shown to users in the platform.","examples":["Barrel Temperature"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values.","examples":["°C"]},"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.","examples":[0.1]},"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.","examples":["FLOAT"]},"details":{"oneOf":[{"$ref":"#/components/schemas/CreateSparkVariableDetails"}],"title":"Details","discriminator":{"propertyName":"type","mapping":{"spark":"#/components/schemas/CreateSparkVariableDetails"}}}},"type":"object","required":["data_type","details"],"title":"CreateVariableItem"},"DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0.0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"DataSource":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"type":{"type":"string","title":"Type"},"readout_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Readout Limit"},"readout_interval":{"type":"integer","title":"Readout Interval"},"readout_status":{"$ref":"#/components/schemas/ReadoutStatus"},"name":{"type":"string","title":"Name","description":"The human readable name of the data source."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"Which SPARK reads from the data source. It must be located at the same site as the current SPARK."},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer","description":"Manufacturer of the data source.","examples":["Siemens","ABB","OMRON"]},"device_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Model","description":"Specific model or name describing the data source as concretely as possible.","examples":["S7-1214C","PM556-TP-ETH","WinCC"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"General remarks concerning this data source."},"capabilities":{"$ref":"#/components/schemas/DataSourceCapabilities"},"machine":{"type":"string","format":"uuid","title":"Machine","description":"On which machine the data source is located."},"last_readout_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Readout At","description":"This field is deprecated, use the `readout_status.last_readout_at`","deprecated":true},"details":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AllenBradleyDetails"},{"$ref":"#/components/schemas/ModbusTcpDetails"},{"$ref":"#/components/schemas/S7PlusDetails"},{"$ref":"#/components/schemas/S7Details"},{"$ref":"#/components/schemas/KraussMaffeiDetails"},{"$ref":"#/components/schemas/FinsDetails"},{"$ref":"#/components/schemas/ReadOpcUaDetails"},{"$ref":"#/components/schemas/EnlyzeGatewayDetails"},{"$ref":"#/components/schemas/OdacDetails"},{"$ref":"#/components/schemas/PlastcontrolDetails"}],"discriminator":{"propertyName":"type","mapping":{"allen_bradley":"#/components/schemas/AllenBradleyDetails","enlyze_gateway":"#/components/schemas/EnlyzeGatewayDetails","fins":"#/components/schemas/FinsDetails","krauss_maffei":"#/components/schemas/KraussMaffeiDetails","modbus_tcp":"#/components/schemas/ModbusTcpDetails","odac":"#/components/schemas/OdacDetails","opcua":"#/components/schemas/ReadOpcUaDetails","plastcontrol":"#/components/schemas/PlastcontrolDetails","s7":"#/components/schemas/S7Details","s7plus":"#/components/schemas/S7PlusDetails"}}},{"type":"null"}],"title":"Data Source Details","description":"Data Source specific properties required for the connection to the data source"}},"type":"object","required":["uuid","type","readout_limit","readout_interval","readout_status","name","spark","manufacturer","device_model","note","capabilities","machine","last_readout_at","details"],"title":"DataSource"},"DataSourceCapabilities":{"properties":{"variable_discovery":{"type":"boolean","title":"Variable Discovery","description":"Indicates whether variable discovery is supported."}},"type":"object","required":["variable_discovery"],"title":"DataSourceCapabilities"},"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"},"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"},"DatetimeRange":{"properties":{"start":{"type":"string","format":"date-time","title":"Start","description":"Datetime with timezone in ISO Format e.g. '2000-01-02T09:10:0.0+00:00'. Must be 10-minute aligned starting at 0, i.e. the valid values for the minute portion are [0, 10, 20, 30, 40, 50]. The second and microsecond portions must be 0."},"end":{"type":"string","format":"date-time","title":"End","description":"Datetime with timezone in ISO Format e.g. '2000-01-02T09:10:0.0+00:00'. Must be 10-minute aligned starting at 0, i.e. the valid values for the minute portion are [0, 10, 20, 30, 40, 50]. The second and microsecond portions must be 0."}},"type":"object","required":["start","end"],"title":"DatetimeRange"},"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"},"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"},"Downtime":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Donwtime UUID","description":"The UUID of the downtime."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the downtime was observed on."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Comment associated with the downtime."},"type":{"$ref":"#/components/schemas/DowntimeType","title":"Downtime Type","description":"Type of the downtime."},"updated":{"anyOf":[{"$ref":"#/components/schemas/DowntimeUpdateInformation"},{"type":"null"}],"title":"Downtime Update Information","description":"Information about the update operation if the downtime was updated."},"reason":{"anyOf":[{"$ref":"#/components/schemas/DowntimeReason"},{"type":"null"}],"title":"Downtime Reason","description":"The reason this downtime occured."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the downtime in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the downtime in ISO8601 format with timezone info. If the value of this field is `null`, the downtime is not yet over."}},"type":"object","required":["uuid","machine","comment","type","updated","reason","start","end"],"title":"Downtime"},"DowntimeCatalog":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Downtime Catalog UUID","description":"The UUID of the downtime catalog."},"name":{"type":"string","title":"Name","description":"Name of the downtime catalog."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description of the downtime catalog."},"state":{"$ref":"#/components/schemas/DowntimeCatalogState","title":"State","description":"Lifecycle state of the downtime catalog."}},"type":"object","required":["uuid","name","state"],"title":"DowntimeCatalog"},"DowntimeCatalogState":{"type":"string","enum":["active","archived"],"title":"DowntimeCatalogState"},"DowntimeCategory":{"type":"string","enum":["PLANNED","UNPLANNED","NOT_SCHEDULED","INVALID"],"title":"DowntimeCategory"},"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"},"DowntimeReason":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Donwtime Reason UUID","description":"The UUID of the downtime reason."},"name":{"type":"string","title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"Category of the downtime reason."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Downtime Reason State","description":"Lifecycle state of the downtime reason."},"catalog":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Downtime Catalog","description":"UUID of the catalog this reason belongs to. Resolve it via `GET /api/v2/downtime-catalogs/{uuid}`. `null` for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on `GET /api/v2/downtimes`)."}},"type":"object","required":["uuid","name","category","group","state"],"title":"DowntimeReason"},"DowntimeReasonState":{"type":"string","enum":["active","archived"],"title":"DowntimeReasonState"},"DowntimeType":{"type":"string","enum":["THRESHOLD","NO_DATA"],"title":"DowntimeType"},"DowntimeUpdateInformation":{"properties":{"first_name":{"type":"string","title":"First Name","description":"First name of the individual who updated the downtime."},"last_name":{"type":"string","title":"Last Name","description":"Last name of the individual who updated the downtime."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"The timestamp in which the update occurred at in ISO8601 format with timezone info."}},"type":"object","required":["first_name","last_name","timestamp"],"title":"DowntimeUpdateInformation"},"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"},"EnlyzeGatewayDetails":{"properties":{"host":{"type":"string","title":"Host","description":"Host or IP of the computer running the Enlyze Gateway"},"port":{"type":"integer","title":"Port","description":"The port of the Enlyze Gateway"},"protocol_details":{"oneOf":[{"$ref":"#/components/schemas/OpcDaProtocolDetails"},{"$ref":"#/components/schemas/PviProtocolDetails"},{"$ref":"#/components/schemas/OtherProtocolDetails"}],"title":"Protocol Details","discriminator":{"propertyName":"protocol","mapping":{"OPC_DA":"#/components/schemas/OpcDaProtocolDetails","OTHER":"#/components/schemas/OtherProtocolDetails","PVI":"#/components/schemas/PviProtocolDetails"}}},"type":{"type":"string","const":"enlyze_gateway","title":"Type"}},"type":"object","required":["host","port","protocol_details","type"],"title":"EnlyzeGatewayDetails"},"EnlyzeGatewayError":{"properties":{"type":{"type":"string","const":"ENLYZE_GATEWAY_ERROR","title":"Type"}},"type":"object","required":["type"],"title":"EnlyzeGatewayError"},"ErrorReadoutStatus":{"properties":{"reason":{"oneOf":[{"$ref":"#/components/schemas/HostLookupError"},{"$ref":"#/components/schemas/NoRouteToHost"},{"$ref":"#/components/schemas/HostDown"},{"$ref":"#/components/schemas/NetworkUnreachable"},{"$ref":"#/components/schemas/ConnectionRefused"},{"$ref":"#/components/schemas/ConnectionReset"},{"$ref":"#/components/schemas/ConnectionClosed"},{"$ref":"#/components/schemas/Timeout"},{"$ref":"#/components/schemas/EnlyzeGatewayError"},{"$ref":"#/components/schemas/OpcUaErrorResponse"},{"$ref":"#/components/schemas/OpcUaNoMatchingEndpointPolicy"},{"$ref":"#/components/schemas/S7PlusError"},{"$ref":"#/components/schemas/FinsNetworkRelayError"},{"$ref":"#/components/schemas/UnknownReadoutFailureReason"}],"title":"Reason","description":"Details about what went wrong","discriminator":{"propertyName":"type","mapping":{"CONNECTION_CLOSED":"#/components/schemas/ConnectionClosed","CONNECTION_REFUSED":"#/components/schemas/ConnectionRefused","CONNECTION_RESET":"#/components/schemas/ConnectionReset","ENLYZE_GATEWAY_ERROR":"#/components/schemas/EnlyzeGatewayError","FINS_NETWORK_RELAY_ERROR":"#/components/schemas/FinsNetworkRelayError","HOST_DOWN":"#/components/schemas/HostDown","LOOKUP_ERROR":"#/components/schemas/HostLookupError","NETWORK_UNREACHABLE":"#/components/schemas/NetworkUnreachable","NO_ROUTE_TO_HOST":"#/components/schemas/NoRouteToHost","OPC_UA_ERROR_RESPONSE":"#/components/schemas/OpcUaErrorResponse","OPC_UA_NO_MATCHING_ENDPOINT_POLICY":"#/components/schemas/OpcUaNoMatchingEndpointPolicy","S7PLUS_ERROR":"#/components/schemas/S7PlusError","TIMEOUT":"#/components/schemas/Timeout","UNKNOWN":"#/components/schemas/UnknownReadoutFailureReason"}}},"error_at":{"type":"string","format":"date-time","title":"Error At","description":"The time this error occured"},"type":{"type":"string","const":"ERROR","title":"Type","default":"ERROR"}},"type":"object","required":["reason","error_at"],"title":"ErrorReadoutStatus"},"FinsDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":9600},"target_plc":{"$ref":"#/components/schemas/OmronTargetPlc","default":"Cs1OrNewer"},"local_address":{"type":"string","title":"Local Address","description":"OMRON device address (\"NETWORK.NODE.UNIT\") of the spark","examples":["1.240.0"]},"remote_address":{"type":"string","title":"Remote Address","description":"OMRON device address (\"NETWORK.NODE.UNIT\") of the PLC","examples":["1.240.0"]},"type":{"type":"string","const":"fins","title":"Type"}},"type":"object","required":["host","local_address","remote_address","type"],"title":"FinsDetails"},"FinsNetworkRelayError":{"properties":{"type":{"type":"string","const":"FINS_NETWORK_RELAY_ERROR","title":"Type"},"response_code":{"type":"integer","title":"Response Code","description":"The FINS response (end) code reported by the relay."},"requested_node":{"type":"integer","title":"Requested Node","description":"The node number the request was addressed to."},"relay_network":{"type":"integer","title":"Relay Network","description":"The network address of the relay that reported the error."},"relay_node":{"type":"integer","title":"Relay Node","description":"The node address of the relay that reported the error."}},"type":"object","required":["type","response_code","requested_node","relay_network","relay_node"],"title":"FinsNetworkRelayError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HostDown":{"properties":{"type":{"type":"string","const":"HOST_DOWN","title":"Type"}},"type":"object","required":["type"],"title":"HostDown"},"HostLookupError":{"properties":{"type":{"type":"string","const":"LOOKUP_ERROR","title":"Type"}},"type":"object","required":["type"],"title":"HostLookupError"},"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"},"KraussMaffeiDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":18901},"machine":{"$ref":"#/components/schemas/KraussMaffeiMachine"},"initialization_mode":{"$ref":"#/components/schemas/KraussMaffeiInitializationMode"},"type":{"type":"string","const":"krauss_maffei","title":"Type"}},"type":"object","required":["host","machine","initialization_mode","type"],"title":"KraussMaffeiDetails"},"KraussMaffeiInitializationMode":{"type":"string","enum":["Default","Extended"],"title":"KraussMaffeiInitializationMode"},"KraussMaffeiMachine":{"type":"string","enum":["C4","C5","C6"],"title":"KraussMaffeiMachine"},"Machine":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"name":{"type":"string","title":"Name"},"site":{"type":"string","format":"uuid","title":"Site"},"genesis_date":{"type":"string","format":"date","title":"Genesis Date"}},"type":"object","required":["uuid","name","site","genesis_date"],"title":"Machine"},"MachineCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of your Machine. Can be changed later","examples":["Extruder X"]},"site":{"type":"string","format":"uuid","title":"Site","description":"UUID of the site this machine belongs to"}},"type":"object","required":["name","site"],"title":"MachineCreateRequest"},"MachineUpdateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of your Machine. Can be changed later","examples":["Extruder X"]}},"type":"object","title":"MachineUpdateRequest"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"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"},"ModbusOriginIdentifier":{"properties":{"slave_id":{"type":"integer","maximum":255.0,"minimum":0.0,"title":"Slave Id","description":"Modbus slave/unit id."},"address":{"type":"integer","maximum":65535.0,"minimum":0.0,"title":"Address","description":"Register address."},"register_type":{"$ref":"#/components/schemas/ModbusRegisterType","description":"Which Modbus register table."},"data_type":{"type":"string","title":"Data Type","description":"Register datatype, e.g. `INT16`, `STRING[20]`."}},"type":"object","required":["slave_id","address","register_type","data_type"],"title":"ModbusOriginIdentifier"},"ModbusRegisterType":{"type":"string","enum":["coil","input","holding","discrete_input"],"title":"ModbusRegisterType"},"ModbusTcpDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":502},"ephemeral_connections":{"type":"boolean","title":"Ephemeral Connections","description":"Toggles whether to establish a new connection for each readout.","default":true},"type":{"type":"string","const":"modbus_tcp","title":"Type"}},"type":"object","required":["host","type"],"title":"ModbusTcpDetails"},"NetworkAddress":{"properties":{"ip":{"type":"string","format":"ipv4","title":"IP","description":"The IP of the network interface."},"dhcp_enabled":{"type":"boolean","title":"DHCP Enabled","description":"Indicates whether DHCP is used to configure the IP address."},"gateway_ip":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"null"}],"title":"Gateway IP","description":"The IP of the network gateway."},"net_mask":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"null"}],"title":"Netmask","description":"Subnet mask in dot-decimal notation (like IPv4 address)."}},"type":"object","required":["ip","dhcp_enabled","gateway_ip","net_mask"],"title":"NetworkAddress"},"NetworkInterface":{"properties":{"interface_name":{"type":"string","title":"Interface Name","description":"The name of the network interface.","examples":["eth0","eth1"]},"mac_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"MAC Address","description":"The MAC address of the network interface.","examples":["80:a9:97:0d:3f:7a"]},"addresses":{"items":{"$ref":"#/components/schemas/NetworkAddress"},"type":"array","title":"Addresses","description":"The set of network addresses associated with the network interface."},"state":{"$ref":"#/components/schemas/NetworkInterfaceState","title":"Network Interface State","description":"The state of the network interface."}},"type":"object","required":["interface_name","mac_address","addresses","state"],"title":"NetworkInterface"},"NetworkInterfaceState":{"type":"string","enum":["down","unknown","up"],"title":"NetworkInterfaceState"},"NetworkUnreachable":{"properties":{"type":{"type":"string","const":"NETWORK_UNREACHABLE","title":"Type"}},"type":"object","required":["type"],"title":"NetworkUnreachable"},"NoRouteToHost":{"properties":{"type":{"type":"string","const":"NO_ROUTE_TO_HOST","title":"Type"}},"type":"object","required":["type"],"title":"NoRouteToHost"},"NotFoundError":{"properties":{"msg":{"type":"string","const":"not found","title":"Msg","default":"not found"}},"type":"object","title":"NotFoundError"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"OdacDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","maximum":65535.0,"minimum":0.0,"title":"Port","default":2020},"type":{"type":"string","const":"odac","title":"Type"},"protocol_override":{"anyOf":[{"$ref":"#/components/schemas/OdacProtocolOverride"},{"type":"null"}],"description":"Force a specific protocol. This is a persistent PLC write."}},"type":"object","required":["host","type"],"title":"OdacDetails"},"OdacProtocolOverride":{"type":"string","enum":["odac","host"],"title":"OdacProtocolOverride"},"OfflineSparkStatus":{"properties":{"type":{"type":"string","const":"offline","title":"Type","default":"offline"}},"type":"object","title":"OfflineSparkStatus"},"OkReadoutStatus":{"properties":{"type":{"type":"string","const":"OK","title":"Type","default":"OK"}},"type":"object","title":"OkReadoutStatus"},"OmronTargetPlc":{"type":"string","enum":["Classic","Cs1OrNewer"],"title":"OmronTargetPlc"},"OnlineSparkStatus":{"properties":{"type":{"type":"string","const":"online","title":"Type","default":"online"}},"type":"object","title":"OnlineSparkStatus"},"OpcDaProtocolDetails":{"properties":{"protocol":{"type":"string","const":"OPC_DA","title":"Protocol"},"server_name":{"type":"string","title":"Server Name","description":"The name of the OPC DA server"}},"type":"object","required":["protocol","server_name"],"title":"OpcDaProtocolDetails"},"OpcUaAnonymousUserIdentity":{"properties":{"type":{"type":"string","const":"Anonymous","title":"Type"}},"type":"object","required":["type"],"title":"OpcUaAnonymousUserIdentity"},"OpcUaErrorResponse":{"properties":{"type":{"type":"string","const":"OPC_UA_ERROR_RESPONSE","title":"Type"},"code":{"type":"integer","title":"Code","description":"The numerical error code returned by the OPC UA Server."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"A descriptive name corresponding to the error code."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A descriptive string corresponding to the error code."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"The error reason returned by the server."}},"type":"object","required":["type","code"],"title":"OpcUaErrorResponse"},"OpcUaMessageSecurityMode":{"type":"string","enum":["None","Sign","SignAndEncrypt"],"title":"OpcUaMessageSecurityMode"},"OpcUaNoMatchingEndpointPolicy":{"properties":{"type":{"type":"string","const":"OPC_UA_NO_MATCHING_ENDPOINT_POLICY","title":"Type"},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"The endpoint of the OPC UA server"},"endpoint_security_policy_uri":{"type":"string","title":"Endpoint Security Policy Uri","description":"The URI of the requested Endpoint Security Policy"},"message_security_mode":{"type":"string","title":"Message Security Mode","description":"The requested Message Security Mode"},"token_type":{"type":"string","title":"Token Type","description":"The configured Token Type"},"token_security_policy_uri":{"type":"string","title":"Token Security Policy Uri","description":"The requested Token Security Policy"}},"type":"object","required":["type","endpoint_url","endpoint_security_policy_uri","message_security_mode","token_type","token_security_policy_uri"],"title":"OpcUaNoMatchingEndpointPolicy"},"OpcUaSecurityPolicy":{"type":"string","enum":["None","Aes128-Sha256-RsaOaep","Aes256-Sha256-RsaPss","Basic128Rsa15","Basic256","Basic256Sha256"],"title":"OpcUaSecurityPolicy"},"OpcUaSecuritySettings":{"properties":{"security_mode":{"$ref":"#/components/schemas/OpcUaMessageSecurityMode","description":"The message security mode to use. Modes other than `None` require a `security_policy` other than `None`.","examples":["SignAndEncrypt"]},"endpoint_security_policy":{"$ref":"#/components/schemas/OpcUaSecurityPolicy"},"token_security_policy":{"$ref":"#/components/schemas/OpcUaSecurityPolicy"}},"type":"object","required":["security_mode","endpoint_security_policy","token_security_policy"],"title":"OpcUaSecuritySettings"},"OpcUaUsernamePasswordIdentity":{"properties":{"type":{"type":"string","const":"UserNamePassword","title":"Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["type","username","password"],"title":"OpcUaUsernamePasswordIdentity"},"OpcUaX509CertificateUserIdentity":{"properties":{"type":{"type":"string","const":"X509Certificate","title":"Type"}},"type":"object","required":["type"],"title":"OpcUaX509CertificateUserIdentity"},"OtherProtocolDetails":{"properties":{"protocol":{"type":"string","const":"OTHER","title":"Protocol"}},"type":"object","required":["protocol"],"title":"OtherProtocolDetails"},"PaginatedDataSources":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DataSource"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDataSources"},"PaginatedDowntimeCatalogs":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DowntimeCatalog"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDowntimeCatalogs"},"PaginatedDowntimeReasons":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DowntimeReason"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDowntimeReasons"},"PaginatedDowntimes":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Downtime"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDowntimes"},"PaginatedMachines":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Machine"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedMachines"},"PaginatedProductionRuns":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductionRun"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProductionRuns"},"PaginatedProductivityMetrics":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductivityMetrics"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProductivityMetrics"},"PaginatedProducts":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProducts"},"PaginatedSites":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Site"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedSites"},"PaginatedSparks":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Spark"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedSparks"},"PaginatedVariableDiscoveries":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VariableDiscoveryResponse"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedVariableDiscoveries"},"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"},"PatchAllenBradleyDetails":{"properties":{"type":{"type":"string","const":"allen_bradley","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."}},"type":"object","required":["type"],"title":"PatchAllenBradleyDetails"},"PatchEnlyzeGatewayDetails":{"properties":{"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"type":{"type":"string","const":"enlyze_gateway","title":"Type"},"protocol_details":{"oneOf":[{"$ref":"#/components/schemas/OpcDaProtocolDetails"},{"$ref":"#/components/schemas/PviProtocolDetails"}],"title":"Protocol Details","discriminator":{"propertyName":"protocol","mapping":{"OPC_DA":"#/components/schemas/OpcDaProtocolDetails","PVI":"#/components/schemas/PviProtocolDetails"}}}},"type":"object","required":["type"],"title":"PatchEnlyzeGatewayDetails"},"PatchFinsDetails":{"properties":{"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"target_plc":{"$ref":"#/components/schemas/OmronTargetPlc"},"local_address":{"type":"string","title":"Local Address"},"remote_address":{"type":"string","title":"Remote Address"},"type":{"type":"string","const":"fins","title":"Type"}},"type":"object","required":["type"],"title":"PatchFinsDetails"},"PatchKraussMaffeiDetails":{"properties":{"type":{"type":"string","const":"krauss_maffei","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"machine":{"$ref":"#/components/schemas/KraussMaffeiMachine"},"initialization_mode":{"$ref":"#/components/schemas/KraussMaffeiInitializationMode"}},"type":"object","required":["type","machine","initialization_mode"],"title":"PatchKraussMaffeiDetails"},"PatchModbusTcpDetails":{"properties":{"type":{"type":"string","const":"modbus_tcp","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"ephemeral_connections":{"type":"boolean","title":"Ephemeral Connections","description":"Toggles whether the connection to the Modbus device should be opened just-in-time for the readout and shutdown afterwards. This is necessary for Modbus devices that only support a single concurrent connection."}},"type":"object","required":["type"],"title":"PatchModbusTcpDetails"},"PatchOdacDetails":{"properties":{"type":{"type":"string","const":"odac","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."}},"type":"object","required":["type"],"title":"PatchOdacDetails"},"PatchOpcUaDetails":{"properties":{"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"The OPC-UA endpoint including the `opc.tcp://` prefix, the host and port as well as the server path","examples":["opc.tcp://open.mtconnect.org:4980/sample_server"]},"security_settings":{"$ref":"#/components/schemas/OpcUaSecuritySettings"},"type":{"type":"string","const":"opcua","title":"Type"},"user_identity":{"oneOf":[{"$ref":"#/components/schemas/OpcUaAnonymousUserIdentity"},{"$ref":"#/components/schemas/OpcUaUsernamePasswordIdentity"}],"title":"User Identity","discriminator":{"propertyName":"type","mapping":{"Anonymous":"#/components/schemas/OpcUaAnonymousUserIdentity","UserNamePassword":"#/components/schemas/OpcUaUsernamePasswordIdentity"}}}},"type":"object","required":["type"],"title":"PatchOpcUaDetails"},"PatchPlastcontrolDetails":{"properties":{"type":{"type":"string","const":"plastcontrol","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."}},"type":"object","required":["type"],"title":"PatchPlastcontrolDetails"},"PatchS7Details":{"properties":{"type":{"type":"string","const":"s7","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"rack":{"type":"integer","title":"Rack"},"slot":{"type":"integer","title":"Slot"}},"type":"object","required":["type"],"title":"PatchS7Details"},"PatchS7PlusDetails":{"properties":{"type":{"type":"string","const":"s7plus","title":"Type"},"host":{"type":"string","title":"Host","description":"Host or IP of the PLC."},"port":{"type":"integer","title":"Port","description":"Port the PLC is listening on."},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"destination_tsap":{"$ref":"#/components/schemas/S7PlusDestinationTsap"}},"type":"object","required":["type"],"title":"PatchS7PlusDetails"},"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":{"additionalProperties":true,"type":"object","title":"Origin Identifier","description":"Structured identifier locating the variable at its data source; must match the data source's protocol family and stay unique within the data source.","examples":[{"code":"MW2","datatype":"REAL"},{"address":"v1"}]},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source; `null` clears it.","examples":["Temperature_Actual"]},"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"},"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).","examples":["Barrel Temperature"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values; `null` clears it.","examples":["°C"]},"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.","examples":[0.1]},"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`.","examples":["FLOAT"]},"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"},"PlastcontrolActive":{"properties":{"type":{"type":"string","const":"active","title":"Type"}},"type":"object","required":["type"],"title":"PlastcontrolActive"},"PlastcontrolDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"type":{"type":"string","const":"plastcontrol","title":"Type"},"readout_mode":{"oneOf":[{"$ref":"#/components/schemas/PlastcontrolActive"},{"$ref":"#/components/schemas/PlastcontrolPassive"}],"title":"Readout Mode","discriminator":{"propertyName":"type","mapping":{"active":"#/components/schemas/PlastcontrolActive","passive":"#/components/schemas/PlastcontrolPassive"}}}},"type":"object","required":["host","port","type","readout_mode"],"title":"PlastcontrolDetails"},"PlastcontrolPassive":{"properties":{"type":{"type":"string","const":"passive","title":"Type"}},"type":"object","required":["type"],"title":"PlastcontrolPassive"},"Product":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the product."},"external_id":{"type":"string","title":"External id","description":"The identifier of the product in the ERP/MES.","examples":["6009400032"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["uuid","external_id","name"],"title":"Product"},"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run.","examples":["123e4567-e89b-12d3-a456-426614174000"]},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order.","examples":["FA1234","PO4"]},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"This is the sum of scrap and yield."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"ProductivityMetrics":{"properties":{"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the range in ISO8601 format with timezone info."},"end":{"type":"string","format":"date-time","title":"End","description":"The end of the range in ISO8601 format with timezone info."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold."}},"type":"object","required":["start","end","availability","performance","quality","productivity","quantity_scrap","quantity_yield"],"title":"ProductivityMetrics"},"PviProtocolDetails":{"properties":{"protocol":{"type":"string","const":"PVI","title":"Protocol"},"path":{"type":"string","title":"Path","description":"The path of a PVI node containing variables"}},"type":"object","required":["protocol","path"],"title":"PviProtocolDetails"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"ReadOpcUaDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"endpoint_url":{"type":"string","title":"Endpoint Url","description":"The OPC-UA endpoint including the `opc.tcp://` prefix, the host and port as well as the server path","examples":["opc.tcp://open.mtconnect.org:4980/sample_server"]},"security_settings":{"$ref":"#/components/schemas/OpcUaSecuritySettings"},"type":{"type":"string","const":"opcua","title":"Type"},"user_identity":{"oneOf":[{"$ref":"#/components/schemas/OpcUaAnonymousUserIdentity"},{"$ref":"#/components/schemas/OpcUaUsernamePasswordIdentity"},{"$ref":"#/components/schemas/OpcUaX509CertificateUserIdentity"}],"title":"User Identity","description":"The user identity to use. This can be a basic Username-Password identity,a certificate and key or an anonymous identity implied by `Anonymous`.\nFor more background on user authentication check out the specification: https://opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User's%20Guide%20and%20Reference-QuickOPC/OPC%20UA%20User%20Authentication.html","discriminator":{"propertyName":"type","mapping":{"Anonymous":"#/components/schemas/OpcUaAnonymousUserIdentity","UserNamePassword":"#/components/schemas/OpcUaUsernamePasswordIdentity","X509Certificate":"#/components/schemas/OpcUaX509CertificateUserIdentity"}}}},"type":"object","required":["host","port","endpoint_url","security_settings","type","user_identity"],"title":"ReadOpcUaDetails"},"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"},"ReadoutStatus":{"properties":{"last_readout_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Readout At","description":"The last time the data source was successfully read out.                Is `null` if the data source has not been read out successfully yet."},"configured_variables":{"type":"integer","title":"Configured Variables","description":"Number of active or evaluated variables"},"state":{"oneOf":[{"$ref":"#/components/schemas/OkReadoutStatus"},{"$ref":"#/components/schemas/ErrorReadoutStatus"},{"$ref":"#/components/schemas/UnknownReadoutStatus"}],"title":"State","discriminator":{"propertyName":"type","mapping":{"ERROR":"#/components/schemas/ErrorReadoutStatus","OK":"#/components/schemas/OkReadoutStatus","UNKNOWN":"#/components/schemas/UnknownReadoutStatus"}}}},"type":"object","required":["last_readout_at","configured_variables","state"],"title":"ReadoutStatus"},"ReasonNameCollisionError":{"properties":{"type":{"type":"string","const":"name_collision","title":"Type","default":"name_collision"},"conflict":{"$ref":"#/components/schemas/ConflictingReason","title":"Conflicting Reason","description":"The reason already occupying the slot; when its `state` is `archived`, restoring it is an alternative to creating a new one."}},"type":"object","required":["conflict"],"title":"ReasonNameCollisionError"},"ReasonNotFoundError":{"properties":{"type":{"type":"string","const":"reason_not_found","title":"Type","default":"reason_not_found"}},"type":"object","title":"ReasonNotFoundError"},"ResamplingMethod":{"type":"string","enum":["first","last","max","min","count","sum","avg","median","std","q5","q25","q75","q95"],"title":"ResamplingMethod"},"S7Details":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":102},"rack":{"type":"integer","title":"Rack","default":0},"slot":{"type":"integer","title":"Slot","default":2},"type":{"type":"string","const":"s7","title":"Type"}},"type":"object","required":["host","type"],"title":"S7Details"},"S7OriginIdentifier":{"properties":{"code":{"type":"string","title":"Code","description":"S7 address, e.g. `DB400:12`, `MW2`, `I0.1`."},"datatype":{"type":"string","title":"Datatype","description":"PLC datatype, e.g. `DINT`, `REAL`, `STRING` or `STRING[10]`.","examples":["DINT"]},"hints":{"anyOf":[{"items":{"$ref":"#/components/schemas/S7VariableHint"},"type":"array"},{"type":"null"}],"title":"Hints","description":"Parsing hints for the identifier."}},"type":"object","required":["code","datatype"],"title":"S7OriginIdentifier"},"S7PlusDestinationTsap":{"type":"string","enum":["SIMATIC-ROOT-ES","SIMATIC-ROOT-HMI"],"title":"S7PlusDestinationTsap"},"S7PlusDetails":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"destination_tsap":{"$ref":"#/components/schemas/S7PlusDestinationTsap","description":"`SIMATIC-ROOT-ES` (Engineering Station) works most of the time. `SIMATIC-ROOT-HMI` (HMI)might work if connections with `SIMATIC-ROOT-ES`  fail for some reason like exceeded capacities.","default":"SIMATIC-ROOT-ES"},"type":{"type":"string","const":"s7plus","title":"Type"}},"type":"object","required":["host","port","type"],"title":"S7PlusDetails"},"S7PlusError":{"properties":{"type":{"type":"string","const":"S7PLUS_ERROR","title":"Type"},"category":{"$ref":"#/components/schemas/S7PlusErrorCategory","description":"The category of the error. `AUTHENTICATION` can indicate an incorrect password or lack of permissions."}},"type":"object","required":["type","category"],"title":"S7PlusError"},"S7PlusErrorCategory":{"type":"string","enum":["AUTHENTICATION","UNKNOWN"],"title":"S7PlusErrorCategory"},"S7VariableHint":{"type":"string","enum":["ignore_length"],"title":"S7VariableHint"},"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"},"Site":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"name":{"type":"string","title":"Name"}},"type":"object","required":["uuid","name"],"title":"Site"},"Spark":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the SPARK."},"name":{"type":"string","title":"Name","description":"The human readable name of the SPARK."},"created_at":{"type":"string","format":"date-time","title":"Created at"},"site":{"type":"string","format":"uuid","title":"Site","description":"The UUID of the Site the SPARK is located at."},"network_interfaces":{"items":{"$ref":"#/components/schemas/NetworkInterface"},"type":"array","title":"Network Interfaces","description":"The list of the SPARK's network interfaces."},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last seen at","description":"Last heartbeat timestamp of the SPARK. Use status instead.","deprecated":true},"status":{"$ref":"#/components/schemas/SparkStatus","title":"Status","description":"Status of the SPARK."}},"type":"object","required":["uuid","name","created_at","site","network_interfaces","status"],"title":"Spark"},"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"},"SparkStatus":{"properties":{"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last seen at","description":"Last heartbeat timestamp of the SPARK."},"state":{"oneOf":[{"$ref":"#/components/schemas/OnlineSparkStatus"},{"$ref":"#/components/schemas/OfflineSparkStatus"}],"title":"State","discriminator":{"propertyName":"type","mapping":{"offline":"#/components/schemas/OfflineSparkStatus","online":"#/components/schemas/OnlineSparkStatus"}}}},"type":"object","required":["state"],"title":"SparkStatus"},"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/ModbusOriginIdentifier"},{"additionalProperties":true,"type":"object"}],"title":"Origin Identifier","description":"Structured identifier locating the variable at its data source. S7 and Modbus data sources get a typed shape; any other protocol family falls back to a verbatim object.","examples":[{"code":"MW2","datatype":"REAL"},{"address":"v1"}]},"origin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Name","description":"Name of the variable as reported by the data source.","examples":["Temperature_Actual"]},"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"},"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"},"ThroughputConfiguration":{"properties":{"quantity_unit":{"type":"string","title":"Quantity Unit"}},"type":"object","required":["quantity_unit"],"title":"ThroughputConfiguration"},"Timeout":{"properties":{"type":{"type":"string","const":"TIMEOUT","title":"Type"}},"type":"object","required":["type"],"title":"Timeout"},"TimeseriesData":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"The variable uuids included in the response. The order of this list denotes the order of the data in the `records` field. The `time` column will always be present and the first item in the list. "},"records":{"items":{"items":{},"type":"array"},"type":"array","title":"Records","description":"Tabular data of the requested variables. Each element in the list represents a row with the fields in the same order as in `columns`."}},"type":"object","required":["columns","records"],"title":"TimeseriesData","example":{"columns":["time","79a590fc-622d-490a-9df2-1527d5cdf082","0fc7a383-521e-4ba3-82fb-24225e74c93c"],"records":[["2023-01-03T14:00:00.0+00:00",1,2],["2023-01-03T14:00:10.0+00:00",2,3]]}},"TimeseriesParams":{"properties":{"machine":{"type":"string","title":"Machine","description":"A UUID for a machine"},"start":{"type":"string","format":"date-time","title":"Start","description":"Datetime with timezone in ISO Format e.g. '2000-01-01T09:04:41.783348+00:00'"},"end":{"type":"string","format":"date-time","title":"End","description":"Datetime with timezone in ISO Format e.g. '2000-01-02T09:04:41.783348+00:00'"},"resampling_interval":{"anyOf":[{"type":"integer","maximum":604800.0,"minimum":10.0},{"type":"null"}],"title":"Resampling Interval"},"variables":{"items":{"$ref":"#/components/schemas/VariableWithOptionalResamplingMethod"},"type":"array","maxItems":100,"minItems":1,"title":"Variables"},"cursor":{"type":"string","title":"Get page starting at cursor"}},"type":"object","required":["machine","start","end","variables"],"title":"TimeseriesParams"},"TimeseriesResponse":{"properties":{"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."},"data":{"$ref":"#/components/schemas/TimeseriesData"}},"type":"object","required":["metadata","data"],"title":"TimeseriesResponse"},"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"},"UnknownReadoutFailureReason":{"properties":{"type":{"type":"string","const":"UNKNOWN","title":"Type"}},"type":"object","required":["type"],"title":"UnknownReadoutFailureReason"},"UnknownReadoutStatus":{"properties":{"type":{"type":"string","const":"UNKNOWN","title":"Type","default":"UNKNOWN"}},"type":"object","title":"UnknownReadoutStatus"},"UnknownVariableDiscoveryFailureReason":{"properties":{"type":{"type":"string","const":"UNKNOWN","title":"Type"}},"type":"object","required":["type"],"title":"UnknownVariableDiscoveryFailureReason"},"UnknownVariableError":{"properties":{"type":{"type":"string","title":"Type","description":"Identifies the specific error.","default":"unknown"}},"additionalProperties":true,"type":"object","title":"UnknownVariableError"},"UpdateDataSourceRequest":{"properties":{"name":{"type":"string","title":"Name","description":"The human readable name of the data source."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"Which SPARK reads from the data source. It must be located at the same site as the current SPARK."},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer","description":"Manufacturer of the data source.","examples":["Siemens","ABB","OMRON"]},"device_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Model","description":"Specific model or name describing the data source as concretely as possible.","examples":["S7-1214C","PM556-TP-ETH","WinCC"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"General remarks concerning this data source."},"details":{"oneOf":[{"$ref":"#/components/schemas/PatchAllenBradleyDetails"},{"$ref":"#/components/schemas/PatchEnlyzeGatewayDetails"},{"$ref":"#/components/schemas/PatchKraussMaffeiDetails"},{"$ref":"#/components/schemas/PatchModbusTcpDetails"},{"$ref":"#/components/schemas/PatchOdacDetails"},{"$ref":"#/components/schemas/PatchFinsDetails"},{"$ref":"#/components/schemas/PatchOpcUaDetails"},{"$ref":"#/components/schemas/PatchPlastcontrolDetails"},{"$ref":"#/components/schemas/PatchS7Details"},{"$ref":"#/components/schemas/PatchS7PlusDetails"}],"title":"Data Source Details","description":"Data Source specific properties required for the connection to the data source","discriminator":{"propertyName":"type","mapping":{"allen_bradley":"#/components/schemas/PatchAllenBradleyDetails","enlyze_gateway":"#/components/schemas/PatchEnlyzeGatewayDetails","fins":"#/components/schemas/PatchFinsDetails","krauss_maffei":"#/components/schemas/PatchKraussMaffeiDetails","modbus_tcp":"#/components/schemas/PatchModbusTcpDetails","odac":"#/components/schemas/PatchOdacDetails","opcua":"#/components/schemas/PatchOpcUaDetails","plastcontrol":"#/components/schemas/PatchPlastcontrolDetails","s7":"#/components/schemas/PatchS7Details","s7plus":"#/components/schemas/PatchS7PlusDetails"}}}},"type":"object","title":"UpdateDataSourceRequest"},"UpdateDowntimeReason":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},"type":"object","title":"UpdateDowntimeReason"},"UpdateSiteRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"}},"type":"object","title":"UpdateSiteRequest"},"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"},"VariableCapturingState":{"type":"string","enum":["inactive","active","evaluating"],"title":"VariableCapturingState"},"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"},"VariableDataType":{"type":"string","enum":["FLOAT","INTEGER","STRING","BOOLEAN","ARRAY_FLOAT","ARRAY_INTEGER","ARRAY_STRING","ARRAY_BOOLEAN"],"title":"VariableDataType"},"VariableDiscoveryCreateRequest":{"properties":{"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source this variable discovery is assigned to."}},"type":"object","required":["data_source"],"title":"VariableDiscoveryCreateRequest"},"VariableDiscoveryFailureState":{"properties":{"type":{"type":"string","const":"FAILURE","title":"Type"},"reason":{"oneOf":[{"$ref":"#/components/schemas/HostLookupError"},{"$ref":"#/components/schemas/NoRouteToHost"},{"$ref":"#/components/schemas/HostDown"},{"$ref":"#/components/schemas/NetworkUnreachable"},{"$ref":"#/components/schemas/ConnectionRefused"},{"$ref":"#/components/schemas/ConnectionReset"},{"$ref":"#/components/schemas/ConnectionClosed"},{"$ref":"#/components/schemas/Timeout"},{"$ref":"#/components/schemas/EnlyzeGatewayError"},{"$ref":"#/components/schemas/OpcUaErrorResponse"},{"$ref":"#/components/schemas/OpcUaNoMatchingEndpointPolicy"},{"$ref":"#/components/schemas/S7PlusError"},{"$ref":"#/components/schemas/UnknownVariableDiscoveryFailureReason"}],"title":"Reason","description":"The reason why the variable discovery failed.","discriminator":{"propertyName":"type","mapping":{"CONNECTION_CLOSED":"#/components/schemas/ConnectionClosed","CONNECTION_REFUSED":"#/components/schemas/ConnectionRefused","CONNECTION_RESET":"#/components/schemas/ConnectionReset","ENLYZE_GATEWAY_ERROR":"#/components/schemas/EnlyzeGatewayError","HOST_DOWN":"#/components/schemas/HostDown","LOOKUP_ERROR":"#/components/schemas/HostLookupError","NETWORK_UNREACHABLE":"#/components/schemas/NetworkUnreachable","NO_ROUTE_TO_HOST":"#/components/schemas/NoRouteToHost","OPC_UA_ERROR_RESPONSE":"#/components/schemas/OpcUaErrorResponse","OPC_UA_NO_MATCHING_ENDPOINT_POLICY":"#/components/schemas/OpcUaNoMatchingEndpointPolicy","S7PLUS_ERROR":"#/components/schemas/S7PlusError","TIMEOUT":"#/components/schemas/Timeout","UNKNOWN":"#/components/schemas/UnknownVariableDiscoveryFailureReason"}}}},"type":"object","required":["type","reason"],"title":"VariableDiscoveryFailureState"},"VariableDiscoveryInProgressState":{"properties":{"type":{"type":"string","const":"IN_PROGRESS","title":"Type"},"added_variables":{"type":"integer","title":"Added Variables","description":"The number of variables added by this discovery"}},"type":"object","required":["type","added_variables"],"title":"VariableDiscoveryInProgressState"},"VariableDiscoveryPendingState":{"properties":{"type":{"type":"string","const":"PENDING","title":"Type"}},"type":"object","required":["type"],"title":"VariableDiscoveryPendingState"},"VariableDiscoveryResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"Unique identifier for this variable discovery"},"data_source":{"type":"string","format":"uuid","title":"Data Source","description":"The data source this variable discovery is assigned to."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when this variable discovery was created."},"last_modified_at":{"type":"string","format":"date-time","title":"Last Modified At","description":"Timestamp when this variable discovery was last modified, generally the case when its state changes."},"state":{"oneOf":[{"$ref":"#/components/schemas/VariableDiscoveryPendingState"},{"$ref":"#/components/schemas/VariableDiscoveryInProgressState"},{"$ref":"#/components/schemas/VariableDiscoverySucessState"},{"$ref":"#/components/schemas/VariableDiscoveryFailureState"}],"title":"State","description":"The current state of the variable discovery.","discriminator":{"propertyName":"type","mapping":{"FAILURE":"#/components/schemas/VariableDiscoveryFailureState","IN_PROGRESS":"#/components/schemas/VariableDiscoveryInProgressState","PENDING":"#/components/schemas/VariableDiscoveryPendingState","SUCCESS":"#/components/schemas/VariableDiscoverySucessState"}}}},"type":"object","required":["uuid","data_source","created_at","last_modified_at","state"],"title":"VariableDiscoveryResponse"},"VariableDiscoveryState":{"type":"string","enum":["PENDING","IN_PROGRESS","SUCCESS","FAILURE"],"title":"VariableDiscoveryState"},"VariableDiscoverySucessState":{"properties":{"type":{"type":"string","const":"SUCCESS","title":"Type"},"added_variables":{"type":"integer","title":"Added Variables","description":"The number of variables added by this discovery"}},"type":"object","required":["type","added_variables"],"title":"VariableDiscoverySucessState"},"VariableOutcome":{"properties":{"outcome":{"$ref":"#/components/schemas/VariableOutcomeKind","description":"What happened to this item."},"data":{"$ref":"#/components/schemas/VariableResponse","description":"The variable's current server-side 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.","examples":["Barrel Temperature"]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of measure of the values.","examples":["°C"]},"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.","examples":[0.1]},"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.","examples":["FLOAT"]},"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"},"VariableWithOptionalResamplingMethod":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"resampling_method":{"anyOf":[{"$ref":"#/components/schemas/ResamplingMethod"},{"type":"null"}]}},"type":"object","required":["uuid"],"title":"VariableWithOptionalResamplingMethod"}},"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Sites"},{"name":"Machines"},{"name":"Data Sources"},{"name":"SPARKs"},{"name":"Variables"},{"name":"Variable Discoveries"},{"name":"Timeseries"},{"name":"Production Runs"},{"name":"Products"},{"name":"Downtimes"},{"name":"Downtime Catalogs","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."},{"name":"Downtime Reasons","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}]}