experiments
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/preview_links Scope experiment:readParameters
project_idstringpathrequiredidstringpathrequiredurlstringqueryrequiredPage to preview (http or https)
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/preview_links?url=<url>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 One QA link per variant: opening it forces that variant in the visitor's browser and records no exposure
Example
{
"data": [
{
"url": "string",
"variant": "string"
}
]
}Schema
dataPreviewLink[]requiredShow child parameters
urlstringrequiredvariantstringrequired400
404
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/rerandomize Scope experiment:writeRotate the salt of the experiment's flag and, while it runs, restart its analysis window.
Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
confirmstringrequiredThe flag key, typed again to confirm.
reasonstringrequiredWhy (1-500 chars); kept on the flag history row and the audit entry.
reset_stickybooleanAlso forget stored sticky assignments (default true); false keeps sticky units where they are.
{
"confirm": "string",
"reason": "string",
"reset_sticky": true
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/rerandomize" \
-H "Content-Type: application/json" \
-d '{"confirm":"string","reason":"string","reset_sticky":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"environments": [
"string"
],
"flag_id": "string",
"results_reset_at": "2024-01-01T00:00:00Z",
"sticky_removed": 0,
"warning": "string"
}Schema
environmentsstring[]requiredEnvironments whose own targeting got the new salt too.
flag_idstringrequiredresults_reset_atstringSet when a running experiment's analysis window restarted now.
sticky_removedintegerrequiredwarningstringrequired400
403
404
409
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/reset Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/reset"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 back to draft, results cleared, flag off
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_atstringrequiredvariantsobjectrequiredwinnerstring404
409
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/results Scope experiment:readParameters
project_idstringpathrequiredidstringpathrequiredbreakdownstringqueryas_ofstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"experiment_id": "string",
"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,
"links": [
{
"cohort": "string",
"replays": {},
"variant": "string"
}
],
"meta": {},
"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"
}
]
}
],
"revenue": [
{
"buyers": 0,
"exposed_units": 0,
"revenue": 0,
"revenue_per_exposed_unit": 0,
"variant": "string"
}
],
"segments": {},
"srm": {
"chi2": 0,
"flagged": true,
"observed": [
[
null
]
],
"p_value": 0
},
"status": "string",
"switched_units": 0,
"variant_names": {}
}Schema
experiment_idstringrequiredexposure_healthExposureHealthShow child parameters
exposed_unitsintegerrequiredflaggedbooleanrequiredignored_before_startintegerrequiredUnits 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_internalintegerrequiredUnits of internal / test traffic left out (only when the experiment filters it).
ignored_invalid_variantintegerrequiredUnits exposed with a variant key the experiment does not define.
multi_exposed_unitsintegerrequiredmulti_exposure_ratenumberrequiredmulti_exposed / (exposed + multi_exposed).guardrail_breachedbooleanrequiredlinksVariantLinks[]requiredPer variant: replay search, exposed-units cohort.
Show child parameters
cohortstringrequiredPOST here to snapshot the variant's exposed units as a static cohort.replaysobjectrequiredPOST this body to replays_search to list the variant's replays.variantstringrequiredmetaobjectrequired{control, start, end, stats_config, post_stratified}; post_stratified is a list of {id, name, variants: [{variant, diff, se, ci_low, ci_high, p_value, strata_used}]} when stats_config.stratify names a property, else null.metricsarrayMetrics of the whole population (segment
"").revenueVariantRevenue[]requiredPer variant revenue of the exposed units (project revenue config).
Show child parameters
buyersintegerrequiredexposed_unitsintegerrequiredrevenuenumberrequiredSum of the purchase revenue property in the base currency (other currencies converted).
revenue_per_exposed_unitnumberrequiredvariantstringrequiredsegmentsobjectrequiredPer breakdown segment;
"" without a breakdown.srmSrmReportShow child parameters
chi2numberrequiredflaggedbooleanrequiredobservedobject[][]requiredp_valuenumberrequiredstatusstringrequiredswitched_unitsintegervariant_namesobjectrequiredDisplay name per variant key (variants never renamed are absent); keys never change.
404
503
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/results/daily Scope experiment:readPer-day effect (metric events of that day only, among all units exposed so far) with a novelty verdict over the trend.
Parameters
project_idstringpathrequiredidstringpathrequiredmetricstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/daily"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"metric": "string",
"novelty": {
"days": 0,
"detected": true,
"early_effect": 0,
"late_effect": 0,
"slope_per_day": 0,
"z": 0
},
"slices": [
{
"as_of": "2024-01-01T00:00:00Z",
"day": 0,
"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
metricstringrequirednoveltyNoveltyReportShow child parameters
daysintegerrequireddetectedbooleanrequiredThe effect is fading toward zero (or flipping sign) faster than noise explains: the early lift was probably novelty, not a lasting effect.
early_effectnumberrequiredPrecision-weighted mean effect of the first / last third of the slices.
late_effectnumberrequiredslope_per_daynumberrequiredWeighted least-squares slope of the daily effect, per day.
znumberrequiredslicesDailySlice[]requiredShow child parameters
as_ofstringrequiredEnd of the slice (exclusive); the slice covers the 24 hours before it.
dayintegerrequiredmetricMetricResultShow 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/distribution Scope experiment:readPer-variant histogram of the per-unit metric value (primary metric unless `metric` is given), over exposed units that saw one variant.
Parameters
project_idstringpathrequiredidstringpathrequiredmetricstringquerybinsintegerquery2 to 100, default 20
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/distribution"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"bins": 0,
"hi": 0,
"lo": 0,
"metric": "string",
"variants": [
{
"counts": [
0
],
"units": 0,
"variant": "string"
}
]
}Schema
binsintegerrequiredhinumberrequiredlonumberrequiredPooled range of the per-unit value; bin
i covers lo + i * (hi - lo) / bins.metricstringrequiredvariantsVariantHistogram[]requiredShow child parameters
countsinteger[]requiredUnits per bin,
bins entries.unitsintegerrequiredvariantstringrequired400
404
503
Updated