experiments
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/results/series Scope experiment:readCumulative results as of the end of each day since start (primary metric unless `metric` is given).
Parameters
project_idstringpathrequiredidstringpathrequiredmetricstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/series"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"metric": "string",
"points": [
{
"as_of": "2024-01-01T00:00:00Z",
"metric": {
"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"
}
]
}
}
]
}Schema
metricstringrequiredpointsSeriesPoint[]requiredShow child parameters
as_ofstringrequiredmetricMetricResultShow child parameters
cuped_thetanumbercuped_thetasnumber[]requiredOne slope per covariate when CUPED used several (the first is the metric's own pre-period).
guardrailGuardrailStatusidstringrequirednamestringrequiredrolestringrequiredvariance_reductionnumbervariantsVariantResult[]required400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/results/slices Scope experiment:readThe metric's per-variant results in each slice of `dimension` and Cochran's Q across slices.
Parameters
project_idstringpathrequiredidstringpathrequireddimensionstringqueryrequiredmetricstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/slices?dimension=<dimension>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"dimension": "string",
"heterogeneity": [
{
"df": 0,
"flagged": true,
"p_value": 0,
"pooled": 0,
"q": 0,
"slices_used": 0,
"variant": "string"
}
],
"metric": "string",
"slices": [
{
"segment": "string",
"units": 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"
}
]
}
]
}Schema
dimensionstringrequiredheterogeneityVariantHeterogeneity[]requiredPer variant: is the effect the same in every slice?
Show child parameters
dfnumberrequiredflaggedbooleanrequiredp_value < alpha: the effect differs between slices.p_valuenumberrequiredpoolednumberrequiredInverse-variance weighted effect across slices.
qnumberrequiredslices_usedintegerrequiredSlices that entered the test.
variantstringrequiredmetricstringrequiredslicesSlice[]requiredShow child parameters
segmentstringrequiredunitsintegerrequiredExposed units in the slice (all variants).
variantsVariantResult[]requiredShow child parameters
chance_to_winnumberci_highnumberci_lownumberconversionsintegerProportion metrics: units that converted (
mean = conversions / units before adjustment).diffnumberexpected_lossnumberexposed_unitsintegerrequiredUnits of this arm that were exposed and analysed (the arm's share of the exposed total).
harm_p_valuenumberGuardrails: one-sided p-value for harm.
is_controlbooleanrequiredlift_ci_highnumberlift_ci_lownumberFieller interval on
relative_lift (ratio metrics only; valid near a zero control).meannumberrequirednotestringp_adjustednumberp_valuenumberRaw p-value (always-valid for the sequential engine).
relative_liftnumbersignificantbooleanrequiredunitsintegerrequiredvariantstringrequired400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/running-time Scope experiment:readLive remaining-days estimate: the current exposure rate against the sample size the primary metric needs, with the baseline and variance read from the running control arm.
Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/running-time"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"daily_exposure_rate": 0,
"days_running": 0,
"exposed": 0,
"metric_id": "string",
"note": "string",
"progress_pct": 0,
"remaining_days": 0,
"required_total": 0,
"sample_size_per_variant": 0
}Schema
daily_exposure_ratenumberrequireddays_runningnumberrequiredexposedintegerrequiredUnits exposed so far (all variants, switched units excluded).
metric_idstringPrimary metric the estimate is for.
notestringprogress_pctnumberremaining_daysnumberDays still needed at the current exposure rate; 0 once reached; null when not estimable.
required_totalintegersample_size_per_variantintegerFrom the control arm's observed mean / variance and
stats_config.mde.404
503
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/ship Scope experiment:writeWinner -> flag serves it to 100% of the ship scope (default: the audience), experiment `shipped` with a results snapshot.
Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
conclusionstringholdback_pctnumberShip with holdback (P-M5): keep this share (0 < h <= 50) of the ship scope on the control variant and track the long-term effect (
GET .../holdback).populationFilter[]Show child parameters
context_kindstringuser | device | org for context filters (LC-FLG-18).group_typestringkeystringrequiredopstringrequiredComparison:
eq, neq, contains, ncontains, regex, nregex, gt, gte, lt, lte, is_set, is_not_set, in, not_in, icontains, not_icontains, starts_with, not_starts_with, ends_with, not_ends_with, between, not_between, is_date_before, is_date_after, semver_eq, semver_neq, semver_gt, semver_gte, semver_lt, semver_lte, semver_tilde, semver_caret, semver_wildcard, array_contains_any, array_contains_all, array_contains_none, ip_in_cidr, ip_not_in_cidr. event filters take only eq neq gt gte lt lte is_set is_not_set between not_between.propertiesFilter[]Predicates on the counted event's own properties (
event filters only): only matching events count. Each is {type: "event_property", key, op, value}.Show child parameters
context_kindstringuser | device | org for context filters (LC-FLG-18).group_typestringkeystringrequiredopstringrequiredComparison:
eq, neq, contains, ncontains, regex, nregex, gt, gte, lt, lte, is_set, is_not_set, in, not_in, icontains, not_icontains, starts_with, not_starts_with, ends_with, not_ends_with, between, not_between, is_date_before, is_date_after, semver_eq, semver_neq, semver_gt, semver_gte, semver_lt, semver_lte, semver_tilde, semver_caret, semver_wildcard, array_contains_any, array_contains_all, array_contains_none, ip_in_cidr, ip_not_in_cidr. event filters take only eq neq gt gte lt lte is_set is_not_set between not_between.propertiesFilter[]Predicates on the counted event's own properties (
event filters only): only matching events count. Each is {type: "event_property", key, op, value}.scopestringsession | page for event filters (P-H6): where the event count is taken; empty = session.typestringrequiredWhat the
key is read from: person, group, cohort, device, geo, app_version, flag, context, event.valueobjectscopestringsession | page for event filters (P-H6): where the event count is taken; empty = session.typestringrequiredWhat the
key is read from: person, group, cohort, device, geo, app_version, flag, context, event.valueobjectscopestringWho gets the winner:
audience (default, the experiment audience), everyone, or population (the population filters).winnerstringrequired{
"conclusion": "string",
"holdback_pct": 0,
"population": [
{
"context_kind": "string",
"group_type": "string",
"key": "string",
"op": "string",
"properties": [
null
],
"scope": "string",
"type": "string",
"value": {}
}
],
"scope": "string",
"winner": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/ship" \
-H "Content-Type: application/json" \
-d '{"conclusion":"string","holdback_pct":0,"population":[{"context_kind":"string","group_type":"string","key":"string","op":"string","properties":[null],"scope":"string","type":"string","value":{}}],"scope":"string","winner":"string"}'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
audienceobjectrequiredconclusionstringcreated_atstringrequiredcreated_bystringended_atstringexposureobjectrequiredflag_idstringrequiredflag_keystringKey of the flag
flag_id names; null only if that flag row is gone.guardrail_stateobjectrequiredholdout_idstringhypothesisstringrequiredidstringrequiredkindstringrequiredmetricsobjectrequired{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.namestringrequirednamespace_idstringproject_idstringrequiredrequires_approvalbooleanrequiredscheduleobjectrequiredshipped_atstringsnapshotobjectstarted_atstringstats_configobjectrequiredstatusstringrequiredtraffic_pctnumberrequiredupdated_atstringrequiredvariantsobjectrequiredwinnerstring400
403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/surrogates/{model_id} Scope experiment:readLong-horizon forecast of an experiment through a trained surrogate model: units exposed at least `short_days` ago, their surrogate values over `short_days`, mapped to the outcome.
Parameters
project_idstringpathrequiredidstringpathrequiredmodel_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/surrogates/{model_id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"arms": [
{
"ci_high": 0,
"ci_low": 0,
"diff": 0,
"p_value": 0,
"predicted": 0,
"units": 0,
"variant": "string"
}
],
"horizon_days": 0,
"model_id": "string",
"outcome_metric_id": "string",
"r2": 0,
"short_days": 0
}Schema
armsArmForecast[]requiredShow child parameters
ci_highnumberci_lownumberdiffnumberVersus control (null for control).
p_valuenumberpredictednumberrequiredPredicted long-horizon outcome per unit.
unitsnumberrequiredvariantstringrequiredhorizon_daysintegerrequiredmodel_idstringrequiredoutcome_metric_idstringrequiredr2numberrequiredshort_daysintegerrequired400
404
503
Updated