Zum Inhalt
HALOWERK

Finopswerk

switchback exposure metric ledger

Reconcile supplied switchback exposure and metric events to known cluster treatment windows, exclude fixed burn intervals and identify the first eligible same-window exposure without multiplying metrics across repeated contacts. Bounded caller-supplied synthetic records only; missing evidence remains unknown. No real account, experiment execution, price retrieval, fees or financial action. A schema-valid unknown is a successful result at the same fixed price. Invalid input raises native.

POST https://finops.halowerk.com/v1/switchback-exposure-metric-ledger

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
burn_in_sintegerJa
burn_out_sintegerJa
windowsarrayJa
unitsarrayJa
exposuresarrayJa
metricsarrayJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "burn_in_s": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3600
    },
    "burn_out_s": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3600
    },
    "windows": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "cluster": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "from": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4102444800
          },
          "to": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4102444800
          },
          "arm": {
            "enum": [
              0,
              1,
              null
            ]
          }
        },
        "required": [
          "id",
          "cluster",
          "from",
          "to",
          "arm"
        ]
      },
      "minItems": 0,
      "maxItems": 8
    },
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "cluster": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,16}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "cluster"
        ]
      },
      "minItems": 0,
      "maxItems": 8
    },
    "exposures": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "unit": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "at": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4102444800
          },
          "observed_arm": {
            "enum": [
              0,
              1,
              null
            ]
          }
        },
        "required": [
          "id",
          "unit",
          "at",
          "observed_arm"
        ]
      },
      "minItems": 0,
      "maxItems": 16
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "unit": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,16}$"
          },
          "at": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4102444800
          },
          "value": {
            "type": "integer",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "claimed_window": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,16}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "unit",
          "at",
          "value"
        ]
      },
      "minItems": 0,
      "maxItems": 16
    }
  },
  "required": [
    "burn_in_s",
    "burn_out_s",
    "windows",
    "units",
    "exposures",
    "metrics"
  ]
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "burn_in_s": 1,
  "burn_out_s": 2,
  "windows": [
    {
      "id": "W0",
      "cluster": "C",
      "from": 0,
      "to": 10,
      "arm": 0
    },
    {
      "id": "W1",
      "cluster": "C",
      "from": 10,
      "to": 20,
      "arm": 1
    }
  ],
  "units": [
    {
      "id": "U",
      "cluster": "C"
    }
  ],
  "exposures": [
    {
      "id": "E0",
      "unit": "U",
      "at": 1,
      "observed_arm": 0
    },
    {
      "id": "E1",
      "unit": "U",
      "at": 11,
      "observed_arm": 1
    }
  ],
  "metrics": [
    {
      "id": "M0",
      "unit": "U",
      "at": 1,
      "value": 2
    },
    {
      "id": "M1",
      "unit": "U",
      "at": 8,
      "value": 9
    },
    {
      "id": "M2",
      "unit": "U",
      "at": 11,
      "value": 3
    }
  ]
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-05, 03:23 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →