experiments

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-experiments"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/6af814d4-70c1-4363-8381-689a51668c4d/social-card.svg?v=3e7ae33eec8b" alt="experiments" width="600" height="315"></a>
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/goalsScope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
namestringrequired
rolestring
primary | secondary (default secondary).
selectorstringrequired
CSS selector of the clicked element (as the visual editor records it).
textstring
Element text to require (exact).
urlstring
Page the click must happen on (URL contains).
{
  "name": "string",
  "role": "string",
  "selector": "string",
  "text": "string",
  "url": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/goals" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","role":"string","selector":"string","text":"string","url":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Click action, proportion metric and the experiment with the metric attached
Example
{
  "action_id": "string",
  "experiment": {
    "audience": {},
    "conclusion": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": "string",
    "ended_at": "2024-01-01T00:00:00Z",
    "exposure": {},
    "flag_id": "string",
    "flag_key": "string",
    "guardrail_state": {},
    "holdout_id": "string",
    "hypothesis": "string",
    "id": "string",
    "kind": "string",
    "metrics": {},
    "name": "string",
    "namespace_id": "string",
    "project_id": "string",
    "requires_approval": true,
    "schedule": {},
    "shipped_at": "2024-01-01T00:00:00Z",
    "snapshot": {},
    "started_at": "2024-01-01T00:00:00Z",
    "stats_config": {},
    "status": "string",
    "traffic_pct": 0,
    "updated_at": "2024-01-01T00:00:00Z",
    "variants": {},
    "winner": "string"
  },
  "metric_id": "string"
}
Schema
action_idstringrequired
experimentobjectrequired
Show child parameters
audienceobjectrequired
conclusionstring
created_atstringrequired
created_bystring
ended_atstring
exposureobjectrequired
flag_idstringrequired
flag_keystring
Key of the flag flag_id names; null only if that flag row is gone.
guardrail_stateobjectrequired
holdout_idstring
hypothesisstringrequired
idstringrequired
kindstringrequired
metricsobjectrequired
{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.
namestringrequired
namespace_idstring
project_idstringrequired
requires_approvalbooleanrequired
scheduleobjectrequired
shipped_atstring
snapshotobject
started_atstring
stats_configobjectrequired
statusstringrequired
traffic_pctnumberrequired
updated_atstringrequired
variantsobjectrequired
winnerstring
metric_idstringrequired
400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/holdbackScope experiment:read

Long-term results of a shipped experiment's holdback.

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/holdback"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "analysis": {
    "exposure_health": {
      "exposed_units": 0,
      "flagged": true,
      "ignored_before_start": 0,
      "ignored_internal": 0,
      "ignored_invalid_variant": 0,
      "multi_exposed_units": 0,
      "multi_exposure_rate": 0
    },
    "guardrail_breached": true,
    "metrics": [
      {
        "cuped_theta": 0,
        "cuped_thetas": [
          0
        ],
        "guardrail": "ok",
        "id": "string",
        "name": "string",
        "role": "primary",
        "variance_reduction": 0,
        "variants": [
          {
            "chance_to_win": 0,
            "ci_high": 0,
            "ci_low": 0,
            "conversions": 0,
            "diff": 0,
            "expected_loss": 0,
            "exposed_units": 0,
            "harm_p_value": 0,
            "is_control": true,
            "lift_ci_high": 0,
            "lift_ci_low": 0,
            "mean": 0,
            "note": "string",
            "p_adjusted": 0,
            "p_value": 0,
            "relative_lift": 0,
            "significant": true,
            "units": 0,
            "variant": "string"
          }
        ]
      }
    ],
    "srm": {
      "chi2": 0,
      "flagged": true,
      "observed": [
        [
          null
        ]
      ],
      "p_value": 0
    },
    "switched_units": 0
  },
  "holdback": {}
}
Schema
analysisAnalysis
Show child parameters
exposure_healthobjectrequired
Multiple-exposure health (LC-EXT-35): units exposed to several variants are excluded from the analysis, so a high rate means assignment is leaking (cookie loss, bucketing on a changing id).
Show child parameters
exposed_unitsintegerrequired
flaggedbooleanrequired
ignored_before_startintegerrequired
Units exposed before the experiment started (left out of the analysis). Filled by the API from the event store; analyze itself leaves the three ignored_* counts at 0.
ignored_internalintegerrequired
Units of internal / test traffic left out (only when the experiment filters it).
ignored_invalid_variantintegerrequired
Units exposed with a variant key the experiment does not define.
multi_exposed_unitsintegerrequired
multi_exposure_ratenumberrequired
multi_exposed / (exposed + multi_exposed).
guardrail_breachedbooleanrequired
Some guardrail is breached: the caller pauses the experiment.
metricsMetricResult[]required
Show child parameters
cuped_thetanumber
cuped_thetasnumber[]required
One slope per covariate when CUPED used several (the first is the metric's own pre-period).
guardrailGuardrailStatus
idstringrequired
namestringrequired
rolestringrequired
primary | secondary | guardrail
variance_reductionnumber
variantsVariantResult[]required
srmSrmReport
Show child parameters
chi2numberrequired
flaggedbooleanrequired
observedobject[][]required
p_valuenumberrequired
switched_unitsintegerrequired
holdbackobjectrequired
{pct, control, winner, since, ended_at}.
404
409
503
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/holdback/endScope experiment:write

End the holdback: the flag serves the winner to everyone in the ship scope.

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/holdback/end"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "audience": {},
  "conclusion": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "ended_at": "2024-01-01T00:00:00Z",
  "exposure": {},
  "flag_id": "string",
  "flag_key": "string",
  "guardrail_state": {},
  "holdout_id": "string",
  "hypothesis": "string",
  "id": "string",
  "kind": "string",
  "metrics": {},
  "name": "string",
  "namespace_id": "string",
  "project_id": "string",
  "requires_approval": true,
  "schedule": {},
  "shipped_at": "2024-01-01T00:00:00Z",
  "snapshot": {},
  "started_at": "2024-01-01T00:00:00Z",
  "stats_config": {},
  "status": "string",
  "traffic_pct": 0,
  "updated_at": "2024-01-01T00:00:00Z",
  "variants": {},
  "winner": "string"
}
Schema
audienceobjectrequired
conclusionstring
created_atstringrequired
created_bystring
ended_atstring
exposureobjectrequired
flag_idstringrequired
flag_keystring
Key of the flag flag_id names; null only if that flag row is gone.
guardrail_stateobjectrequired
holdout_idstring
hypothesisstringrequired
idstringrequired
kindstringrequired
metricsobjectrequired
{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.
namestringrequired
namespace_idstring
project_idstringrequired
requires_approvalbooleanrequired
scheduleobjectrequired
shipped_atstring
snapshotobject
started_atstring
stats_configobjectrequired
statusstringrequired
traffic_pctnumberrequired
updated_atstringrequired
variantsobjectrequired
winnerstring
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/interactionsScope experiment:read

Pairs of concurrent experiments whose effects on a shared metric differ across arms. Sorted by p-value; `flagged` rows are the suspected interactions.

Parameters

project_idstringpathrequired
idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/interactions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "df": 0,
      "effects": [
        {
          "b_variant": "string",
          "diff": 0,
          "se": 0,
          "units": 0
        }
      ],
      "flagged": true,
      "metric_id": "string",
      "metric_name": "string",
      "other_experiment_id": "string",
      "other_name": "string",
      "p_value": 0,
      "q": 0,
      "shared_units": 0,
      "variant": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
dfnumberrequired
effectsArmEffect[]required
This experiment's effect inside each arm of the other experiment.
Show child parameters
b_variantstringrequired
diffnumberrequired
senumberrequired
unitsintegerrequired
Units exposed to both experiments in this arm of B.
flaggedbooleanrequired
Bonferroni over the tests in this response.
metric_idstringrequired
metric_namestringrequired
other_experiment_idstringrequired
other_namestringrequired
p_valuenumberrequired
qnumberrequired
Cochran's Q, its degrees of freedom and p-value (equal effects across arms under H0).
shared_unitsintegerrequired
Units exposed to both experiments.
variantstringrequired
The treatment variant of this experiment the effects are for.
next_cursorstring
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/linksScope experiment:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/links"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "external_key": "string",
      "id": "string",
      "kind": "string",
      "object_id": "string",
      "object_type": "string",
      "title": "string",
      "url": "string"
    }
  ],
  "templated": [
    {
      "kind": "string",
      "template_id": "string",
      "title": "string",
      "url": "string"
    }
  ]
}
Schema
dataResourceLink[]required
Show child parameters
created_atstringrequired
created_bystring
external_keystring
Issue key when the link was created by filing an issue (e.g. ENG-12).
idstringrequired
kindstringrequired
jira | linear | github | gitlab | docs | other
object_idstringrequired
object_typestringrequired
titlestringrequired
urlstringrequired
templatedTemplated[]required
Show child parameters
kindstringrequired
template_idstringrequired
titlestringrequired
urlstringrequired
404

Updated