{"service":"HALOWERK agentenwerk","endpoint":"/v1/twin-diff","method":"POST","content_type":"application/json","inputSchema":{"type":"object","required":["target","observed"],"additionalProperties":false,"properties":{"target":{"type":"object","description":"The desired state document (the twin)."},"observed":{"type":"object","description":"The observed state document (the measurement)."},"tolerances":{"type":"array","maxItems":200,"description":"Per-path tolerances. Give tolerance_abs or tolerance_ratio, not both.","items":{"type":"object","required":["field"],"additionalProperties":false,"properties":{"field":{"type":"string","minLength":1,"maxLength":400,"description":"Leaf path as it appears in the result, e.g. /pump/pressure_bar. A trailing /* applies the entry to every leaf below that prefix."},"unit":{"type":"string","maxLength":32,"description":"Unit of this field, echoed into the result. Declared by you, never inferred."},"tolerance_abs":{"type":"number","minimum":0,"description":"Absolute tolerance in the unit of this field."},"tolerance_ratio":{"type":"number","minimum":0,"maximum":1,"description":"Relative tolerance as a ratio of the larger of the two values."}}}},"default_tolerance_ratio":{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Relative tolerance for numeric paths without their own entry. 0 means exact equality."},"ignore_fields":{"type":"array","maxItems":200,"items":{"type":"string","minLength":1,"maxLength":400},"description":"Paths to leave out of the comparison. A trailing /* ignores everything below that prefix."},"case_insensitive_strings":{"type":"boolean","default":false,"description":"Compare string leaves without regard to case."},"max_fields":{"type":"integer","minimum":1,"maximum":2000,"default":2000,"description":"Reject the request if the two documents together hold more leaf paths than this."}}},"requestExample":{"target":{"pump":{"pressure_bar":4,"running":true},"firmware":"2.4.1","site":{"radius_km":12}},"observed":{"pump":{"pressure_bar":4.15,"running":true},"firmware":"2.3.9","site":{"radius_km":12.4}},"tolerances":[{"field":"/pump/pressure_bar","unit":"bar","tolerance_abs":0.2},{"field":"/site/radius_km","unit":"km","tolerance_ratio":0.01}],"default_tolerance_ratio":0},"operations":[{"method":"POST","inputSchema":{"type":"object","required":["target","observed"],"additionalProperties":false,"properties":{"target":{"type":"object","description":"The desired state document (the twin)."},"observed":{"type":"object","description":"The observed state document (the measurement)."},"tolerances":{"type":"array","maxItems":200,"description":"Per-path tolerances. Give tolerance_abs or tolerance_ratio, not both.","items":{"type":"object","required":["field"],"additionalProperties":false,"properties":{"field":{"type":"string","minLength":1,"maxLength":400,"description":"Leaf path as it appears in the result, e.g. /pump/pressure_bar. A trailing /* applies the entry to every leaf below that prefix."},"unit":{"type":"string","maxLength":32,"description":"Unit of this field, echoed into the result. Declared by you, never inferred."},"tolerance_abs":{"type":"number","minimum":0,"description":"Absolute tolerance in the unit of this field."},"tolerance_ratio":{"type":"number","minimum":0,"maximum":1,"description":"Relative tolerance as a ratio of the larger of the two values."}}}},"default_tolerance_ratio":{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Relative tolerance for numeric paths without their own entry. 0 means exact equality."},"ignore_fields":{"type":"array","maxItems":200,"items":{"type":"string","minLength":1,"maxLength":400},"description":"Paths to leave out of the comparison. A trailing /* ignores everything below that prefix."},"case_insensitive_strings":{"type":"boolean","default":false,"description":"Compare string leaves without regard to case."},"max_fields":{"type":"integer","minimum":1,"maximum":2000,"default":2000,"description":"Reject the request if the two documents together hold more leaf paths than this."}}},"requestExample":{"target":{"pump":{"pressure_bar":4,"running":true},"firmware":"2.4.1","site":{"radius_km":12}},"observed":{"pump":{"pressure_bar":4.15,"running":true},"firmware":"2.3.9","site":{"radius_km":12.4}},"tolerances":[{"field":"/pump/pressure_bar","unit":"bar","tolerance_abs":0.2},{"field":"/site/radius_km","unit":"km","tolerance_ratio":0.01}],"default_tolerance_ratio":0}}],"example_request":{"target":{"pump":{"pressure_bar":4,"running":true},"firmware":"2.4.1","site":{"radius_km":12}},"observed":{"pump":{"pressure_bar":4.15,"running":true},"firmware":"2.3.9","site":{"radius_km":12.4}},"tolerances":[{"field":"/pump/pressure_bar","unit":"bar","tolerance_abs":0.2},{"field":"/site/radius_km","unit":"km","tolerance_ratio":0.01}],"default_tolerance_ratio":0},"serviceName":"twin_diff","tags":["agent","state","diff","twin"],"outputSchema":{"type":"object"},"outputExample":{"summary":{"compared_fields":4,"ignored_fields":0,"in_tolerance":2,"out_of_tolerance":2,"missing_in_observed":0,"unexpected_in_observed":0,"type_mismatch":0,"verdict":"drift"},"deviations":[{"path":"/site/radius_km","status":"out_of_tolerance","target":12,"observed":12.4,"delta_abs":0.4,"delta_ratio":0.0322580645,"unit":"km","unit_source":"declared","tolerance_applied":{"tolerance_ratio":0.01,"source":"explicit"}},{"path":"/firmware","status":"out_of_tolerance","target":"2.4.1","observed":"2.3.9","delta_abs":null,"delta_ratio":null,"unit":null,"unit_source":"not_declared","tolerance_applied":{"comparison":"equality","source":"type_has_no_tolerance"}}],"matching":["/pump/pressure_bar","/pump/running"],"settings_used":{"default_tolerance_ratio":0,"case_insensitive_strings":false,"explicit_tolerances":2,"max_fields":2000},"ignored":[],"limits":"Zustandslos: kein Zwilling wird gehalten, kein Verlauf gefuehrt, nichts synchronisiert. Listen werden ueber den Index verglichen, eine andere Reihenfolge zaehlt als Abweichung. Einheiten werden nie aus dem Feldnamen geschlossen, sondern nur uebernommen, wenn sie erklaert wurden. Nur Zahlen kennen eine Toleranz; Text, Wahrheitswerte und null werden auf Gleichheit geprueft."}}