shiftzero

Config API (dashboard)

The dashboard's control-plane surface — what an edge worker pulls to know which experiments to serve. All routes take the project's publishable API key as a bearer.

GET /api/experiments

Every running experiment, in the exact shape the edge engine consumes:

response
[
  {
    "id": "hero-test",
    "allocation": 50,
    "variants": [
      { "key": "control", "weight": 50, "patches": [] },
      { "key": "variant_b", "weight": 50, "patches": [
        { "kind": "dom", "selector": "#hero", "innerText": "New headline" }
      ]}
    ],
    "targeting": { "all": [ { "type": "device", "anyOf": ["mobile"] } ] }
  }
]

Other routes

EndpointReturns
GET /api/audiencesSaved audiences — resolvable by audience targeting rules at the edge.
GET /api/settingsProject edge settings (the global holdout).
GET /api/config/:keyOne experiment's full edge config (shown in the dashboard's Edge config panel).
GET /api/proxy/config?host=Managed proxy: per-host bundle (origin + experiments + holdout). Master-secret authed.
GET /sz.jsThe track bridge, served prebuilt — the script-tag install.
GET /editor-overlay.jsThe visual editor's pick-an-element overlay (session-authenticated).

Workers cache config pulls on a short TTL (default 30s) and serve the last-good value through control-plane failures — a dashboard outage never takes your site down, it just freezes the experiment roster.